Chef example cloud-init script wrong repo for oneiric

Bug #960564 reported by Lorin Hochstein
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Lorin Hochstein

Bug Description

The chef cloud-init example (doc/examples/cloud-config-chef.txt) contains:


Unfortunately, this won't install the correct repository for Chef 0.10.x. According to, it expects something like:

deb oneiric-0.10 main

But cloud-init sets up

deb oneiric main

For oneiric, only the former syntax works, and so cloud-init fails with an error like:

Mar 20 19:39:39 domU-12-31-39-0A-9D-CB [CLOUDINIT][WARNING]: Traceback (most recent call last):#012 File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/", line 108, in run_cc_modules#012 cc.handle(name, run_args, freq=freq)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/", line 72, in handle#012 [ name, self.cfg,, cloudinit.log, args ])#012 File "/usr/lib/python2.7/dist-packages/cloudinit/", line 309, in sem_and_run#012 func(*args)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/", line 76, in handle#012 install_chef_from_gems(ruby_version, chef_version)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/", line 85, in install_chef_from_gems#012 cc.install_packages(ruby_packages[ruby_version])#012 File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/", line 249, in install_packages#012 update_package_sources()#012 File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/", line 246, in update_package_sources#012 run_per_instance("update-sources", apt_get, ("update",))#012 File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/", line 230, in run_per_instance#012 func(*args)#012 File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/", line 243, in apt_get#012 subprocess.check_call(cmd,env=e)#012 File "/usr/lib/python2.7/", line 511, in check_call#012 raise CalledProcessError(retcode, cmd)#012CalledProcessError: Command '['apt-get', '--option', 'Dpkg::Options::=--force-confold', '--assume-yes', 'update']' returned non-zero exit status 100

Which is because it's trying to pull from nonexistent repos, such as:

W: Failed to fetch 404 Not Found

Related branches

Revision history for this message
Scott Moser (smoser) wrote :

  Using 'apt_mirror' is probably not really right (sorry for the bad documentation).
  Its probably better to use:

  - source: "deb oneiric-0.10 main"

Can you replace the 'apt_mirror' in the example cloud-config and report back as to if that works?

I'd like to have a functional 12.04 chef, so our time is short.

Also, does this work on 12.04 ?

I'd really appreciate testing and feedback you can provide. I'm not a chef user.

Sorry for the slow reply. Please feel free to ping me (smoser) in Freenode IRC

Revision history for this message
Lorin Hochstein (lorinh) wrote :

Linked an example that works with 12.04, although it doesn't work with packages (will submit a separate bug report for this).

Revision history for this message
Scott Moser (smoser) wrote :

fixed in cloud-init trunk at revno 555.

Changed in cloud-init:
assignee: nobody → Lorin Hochstein (lorinh)
importance: Undecided → Low
status: New → In Progress
status: In Progress → Fix Committed
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.