[Bug 1145215] [NEW] cloud-init mangles sources.lists if mirror can't be found

Ben Howard ben.howard at canonical.com
Mon Mar 4 21:04:42 UTC 2013


Public bug reported:

On freshly build non-EC2 boot the system came up with out a useable apt
sources.list.

Mar  4 20:54:02 vhost0761 [CLOUDINIT] cc_apt_pipelining.py[DEBUG]: Wrote /etc/apt/apt.conf.d/90cloud-init-pipelining with APT pipeline setting
Mar  4 20:54:02 vhost0761 [CLOUDINIT] __init__.py[DEBUG]: handling apt-update-upgrade with freq=None and args=[]
Mar  4 20:54:02 vhost0761 [CLOUDINIT] util.py[DEBUG]: Traceback (most recent call last):#012  File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/cc_apt_update_upgrade.py", line 261, in find_apt_mirror_info#012    pmirrors = cfg['system_info']['package_mirrors']#012KeyError: 'system_info'
Mar  4 20:54:02 vhost0761 [CLOUDINIT] cc_apt_update_upgrade.py[WARNING]: Failed to get mirror info, falling back to default
Mar  4 20:54:02 vhost0761 [CLOUDINIT] cc_apt_update_upgrade.py[DEBUG]: mirror info: {'mirror': 'http://ibm.cloud.archive.ubuntu.com', 'primary': 'http://ibm.cloud.archive.ubuntu.com', 'ubuntu': {'security': 'http://security.ubuntu.com/ubuntu', 'primary': 'http://archive.ubuntu.com/ubuntu'}}
Mar  4 20:54:02 vhost0761 [CLOUDINIT] __init__.py[WARNING]: Traceback (most recent call last):#012  File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/__init__.py", line 117, in run_cc_modules#012    cc.handle(name, run_args, freq=freq)#012  File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/__init__.py", line 78, in handle#012    [name, self.cfg, self.cloud, cloudinit.log, args])#012  File "/usr/lib/python2.7/dist-packages/cloudinit/__init__.py", line 326, in sem_and_run#012    func(*args)#012  File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/cc_apt_update_upgrade.py", line 51, in handle#012    generate_sources_list(release, mirrors)#012  File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/cc_apt_update_upgrade.py", line 157, in generate_sources_list#012    util.render_to_file('sources.list', '/etc/apt/sources.list', params)#012  File "/usr/lib/python2.7/dist-packages/cloudinit/util.py", line 245, in render_to_file#012    f.write(t.respond())#012  File "_etc_cloud_templates_sources_list_tmpl.py", line 230, in respond#012NotFound: cannot find 'security'
Mar  4 20:54:02 vhost0761 [CLOUDINIT] __init__.py[ERROR]: config handling of apt-update-upgrade, None, [] failed
Mar  4 20:54:02 vhost0761 [CLOUDINIT] __init__.py[DEBUG]: handling landscape with freq=None and args=[]

** Affects: cloud-init (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  cloud-init mangles sources.lists if mirror can't be found

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



More information about the Ubuntu-server-bugs mailing list