** Description changed: - I am using cloudint 0.7.7~bzr1256-0ubuntu1~16.04.1 on Ubuntu 16.04.1 - LTS. + ==== Begin SRU Template ==== + [Impact] + Users of the OVF datasource can not provide user-data that is base64 encoded. + + [Test Case] + $ rel=xenial + $ burl="http://cloud-images.ubuntu.com/daily/server/$rel/current/" + $ disk="$rel-server-cloudimg-amd64-disk1.img" + $ wget "$burl/$disk" -O "$disk" + + # prepare the ovftransport.iso + $ git clone http://git.launchpad.net/cloud-init + $ ( cd cloud-init/doc/sources/ovf && ./make-iso ovf-env.xml.tmpl user-data --output - ) > ovftransport.iso + + # create a temp disk for patching and patch in -proposed + $ qemu-img create -f qcow2 -b "$disk" disk.img + $ sudo mount-image-callback --system-resolvconf disk.img -- chroot _MOUNTPOINT_ \ + sh -c 'l=/etc/apt/sources.list.d/proposed.list; + echo deb http://archive.ubuntu.com/ubuntu/ xenial-proposed main > "$l" && + apt-get -q update && apt-get install -qy cloud-init' + + $ qemu-system-x86_64 -enable-kvm \ + -device virtio-net-pci,netdev=net00 -netdev type=user,id=net00 \ + -hda disk.img -cdrom ovftransport.iso -m 512 -curses -snapshot + + # you will see an 'ovfdemo' login prompt, log in as root:passw0rd + # verify it worked by cat /var/lib/cloud/instance/user-data.txt + + [Regression Potential] + very low chance for regression, a guest with user-data would be broken previously. + + ==== End SRU Template ==== + + + 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 + <Property oe:key="user-data" oe:value="#cloud-config --- users: - - name: "test" - passwd: "$1$NVdKo9MI$PlHasfYsufCHbP1Hh9TMz/" - groups: - - "sudo" + - 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'...' + 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?
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1619394 Title: base64 user-data broken in OVF datasource To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1619394/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
