yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #64040
[Bug 1691356] [NEW] vendor data is not properly rendered if there are multiline strings
Public bug reported:
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 values.
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
** Affects: cloud-init
Importance: Undecided
Status: New
** Tags: configdrive openstack vendordata
** Tags added: configdrive
--
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:
New
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 values.
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
Follow ups