← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1691356] Re: vendor data is not properly rendered if there are multiline strings

 

[Expired for cloud-init because there has been no activity for 60 days.]

** Changed in: cloud-init
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1691356

Title:
  vendor data is not properly rendered if there are multiline strings

Status in cloud-init:
  Expired

Bug description:
  When using the vendor data to configure a set of cloud-init
  directives, if the YAML document contains multiline strings, the
  rendered vendor-data.txt file has an invalid format.

  According to the OpenStack vendor data format, used in the OpenStack
  and ConfigDrive data sources, the vendor data file is a JSON file that
  might contain a "cloud-init" attribute that is parsed using the same
  handlers as the user data:
  http://cloudinit.readthedocs.io/en/latest/topics/datasources/openstack.html
  #vendor-data

  When that configuration is a "#cloud-config" YAML document with
  multiline strings (for example a validation certificate commonly used
  in the Chef module), the resulting vendor-data.txt is generated with
  invalid values for all multiline string properties.

  The issue is probably in the "safeyaml" utility class, that uses default settings to process the YAML documents:
  https://git.launchpad.net/cloud-init/tree/cloudinit/safeyaml.py?id=0.7.9

  But Python does not properly handle multiline strings by default:
  http://stackoverflow.com/questions/6432605/any-yaml-libraries-in-python-that-support-dumping-of-long-strings-as-block-liter

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1691356/+subscriptions


References