Ubuntu 14.04 cloud config apt_sources error

Posted December 21, 2014 1.8k views

No matter what I do I cannot get a custom apt_sources in cloud config to work. If I just add something like:

 - source: "ppa:smoser/ppa"

I get the following in the cloud-init.log:

Dec 21 00:32:31 ubuntu1404x64 [CLOUDINIT][DEBUG]: Skipping module named apt_configure, no package 'mirror' located

If I then add a “mirror” section to the cloud config I get:


The error is:

Dec 21 00:41:59 ubuntu1404x64 [CLOUDINIT][DEBUG]: Running apt_configure (<module 'cloudinit.config.cc_apt_configure' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_apt_configure.pyc'>) failed#012Traceback (most recent call last):#012  File "/usr/lib/python2.7/dist-packages/cloudinit/", line 658, in _run_modules#012, mod.handle, func_args, freq=freq)#012  File "/usr/lib/python2.7/dist-packages/cloudinit/", line 63, in run#012    return, functor, args, freq, clear_on_fail)#012  File "/usr/lib/python2.7/dist-packages/cloudinit/", line 197, in run#012    results = functor(*args)#012  File "/usr/lib/python2.7/dist-packages/cloudinit/config/", line 55, in handle#012    mirrors = find_apt_mirror_info(cloud, cfg)#012  File "/usr/lib/python2.7/dist-packages/cloudinit/config/", line 265, in find_apt_mirror_info#012    mirror_info.update({'primary': mirror})#012AttributeError: 'str' object has no attribute 'update'

Any ideas?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

I’m glad to say that a fix for this has been released. Using apt_sources should now work as expected.

Thanks for bringing this to our attention!