Comment 0 for bug 1619394

Revision history for this message
Julian Vassev (jvassev) wrote : OVF datasource broken

I am using cloudint 0.7.7~bzr1256-0ubuntu1~16.04.1 on Ubuntu 16.04.1 LTS.

When I pass yaml-formatted user-data over the OVF datasource over the ISO transport the yaml string fails to be parsed.

I tracked this to minidom's inability to handle newlines in an attribute. The xml bellow works for coreos but breaks under cloud-init:

<PropertySection>
         <Property oe:key="user-data" oe:value="#cloud-config
---
users:
  - name: "test"
    passwd: "$1$NVdKo9MI$PlHasfYsufCHbP1Hh9TMz/"
    groups:
      - "sudo"
"/>
</PropertySection>

If I use base64-encoded user-data I get this error:

  Sep 01 12:07:43 sof2-lab3-dhcp371 cloud-init[3248]: 2016-09-01 12:07:43,854 - __init__.py[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'b'I2Nsb3VkLWNvbmZpZwotLS0K'...'
  Sep 01 12:07:43 sof2-lab3-dhcp371 cloud-init[3248]: [CLOUDINIT] __init__.py[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'b'I2Nsb3VkLWNvbmZpZwotLS0K'...'

Is there a way to pass user-data as a single-line string that doesn't confuse minidom?