running this will: a.) download amd64 vivid cloud iamge b.) convert it to qcow2 (removing compression) c.) create a datasource seed and put make that available on port 32999 d.) boot a kvm guest with kernel command line pointing at the seed .
running it with PATCH_IMAGE=cloud-inig.deb will patch the image with the provided cloud-init.deb and then run. ** Description changed: + === Begin SRU Information === + [Impact] + cloud-init cannot read a "seed". Many of the data-sources allow a seed from a url. This is useful in testing, especially with the NoCloud seed from the command line. + + One of the functions in cloud-init simply does not work with python-3, + and the patch makes that work. Patch is applied to upstream and present + in wily. + + [Test Case] + Run the attached test-bug-1455233. Without the patch applied, the system will boot and show error like in the serial.log: + util.py[WARNING]: Getting data from <class 'cloudinit.sources.DataSourceNoCloud.DataSourceNoCloudNet'> failed + + + Additionally, a simple test case can be done more directly by simply running + $ echo "my-userdata" > user-data + $ echo "instance-id: FOO" > meta-data + $ python -m SimpleHTTPServer 8999 + $ python3 -c 'from cloudinit import util; print(util.read_seeded("http://localhost:8999/")' + + The added test case in the build process pushes the code through this + function. + + [Regression Potential] + This code was 100% broken in python3, so likelyhood of regression is very low. + === End SRU Information === + util.read_seeded uses load_tfile_or_url, but then treats the return value as if it was a response. this regressed in revno 1067. ** Description changed: === Begin SRU Information === [Impact] cloud-init cannot read a "seed". Many of the data-sources allow a seed from a url. This is useful in testing, especially with the NoCloud seed from the command line. One of the functions in cloud-init simply does not work with python-3, and the patch makes that work. Patch is applied to upstream and present in wily. [Test Case] Run the attached test-bug-1455233. Without the patch applied, the system will boot and show error like in the serial.log: - util.py[WARNING]: Getting data from <class 'cloudinit.sources.DataSourceNoCloud.DataSourceNoCloudNet'> failed + util.py[WARNING]: Getting data from <class 'cloudinit.sources.DataSourceNoCloud.DataSourceNoCloudNet'> failed + + Additionally, a simple test case can be done more directly by simply running + $ echo "my-userdata" > user-data + $ echo "instance-id: FOO" > meta-data + $ python -m SimpleHTTPServer 8999 & + $ python3 -c 'from cloudinit import util; print(util.read_seeded("http://localhost:8999/", retries=0))' + 127.0.0.1 - - [09/Jun/2015 01:24:05] "GET /meta-data HTTP/1.1" 200 - + Traceback (most recent call last): + File "<string>", line 1, in <module> + File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 842, in read_seeded + if md_resp.ok(): + AttributeError: 'str' object has no attribute 'ok' - Additionally, a simple test case can be done more directly by simply running - $ echo "my-userdata" > user-data - $ echo "instance-id: FOO" > meta-data - $ python -m SimpleHTTPServer 8999 - $ python3 -c 'from cloudinit import util; print(util.read_seeded("http://localhost:8999/")' - - The added test case in the build process pushes the code through this - function. + The added test case in the build process pushes the code through this function. [Regression Potential] This code was 100% broken in python3, so likelyhood of regression is very low. === End SRU Information === util.read_seeded uses load_tfile_or_url, but then treats the return value as if it was a response. this regressed in revno 1067. ** Attachment added: "test case showing recreate" https://bugs.launchpad.net/cloud-init/+bug/1455233/+attachment/4411809/+files/test-bug-1455233 -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1455233 Title: read_seeded broken To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1455233/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs