← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1455233] Re: read_seeded broken

 

This bug was fixed in the package cloud-init - 0.7.7~bzr1091-0ubuntu3

---------------
cloud-init (0.7.7~bzr1091-0ubuntu3) vivid-proposed; urgency=medium

  * d/README.source, debian/cherry-pick-rev: improve packaging tool
  * fix read_seeded method needed for seeding cloud-init via kernel
    command line (LP: #1455233).

 -- Scott Moser <smoser@xxxxxxxxxx>  Mon, 08 Jun 2015 15:39:32 -0400

** Changed in: cloud-init (Ubuntu Vivid)
       Status: Fix Committed => Fix Released

-- 
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/1455233

Title:
  read_seeded broken

Status in Init scripts for use on cloud images:
  Fix Committed
Status in cloud-init package in Ubuntu:
  Fix Released
Status in cloud-init source package in Vivid:
  Fix Released

Bug description:
  === 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/";, 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'

  
  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.

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


References