yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #00275
[Bug 1090482] Re: over-riding distro config still broken
** Changed in: cloud-init (Ubuntu Raring)
Status: Confirmed => 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/1090482
Title:
over-riding distro config still 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 Quantal:
In Progress
Status in “cloud-init” source package in Raring:
Fix Released
Bug description:
bug reported in bug 1076811 is still affecting trunk.
See this example:
$ ec2metadata --user-data
#cloud-config
system_info:
# This will affect which distro class gets used
distro: ubuntu
# Other config here will be given to the distro class and/or path classes
package_mirrors:
- arches: [i386, amd64]
failsafe:
primary: http://archive.ubuntu.com/ubuntu
security: http://security.ubuntu.com/ubuntu
search:
primary:
- http://bogus.invalid.com/ubuntu/
security: []
- arches: [armhf, armel, default]
failsafe:
primary: http://ports.ubuntu.com/ubuntu-ports
security: http://ports.ubuntu.com/ubuntu-ports
That resulted in:
$ grep -v "^#" /etc/apt/sources.list | grep . | head -n 4
deb http://nova.clouds.archive.ubuntu.com/ubuntu/ raring main
deb-src http://nova.clouds.archive.ubuntu.com/ubuntu/ raring main
deb http://nova.clouds.archive.ubuntu.com/ubuntu/ raring-updates main
deb-src http://nova.clouds.archive.ubuntu.com/ubuntu/ raring-updates main
debugging with, I added these lines to /usr/share/pyshared/cloudinit/config/cc_apt_configure.py right
before the call to cloud.datasource.get_package_mirror_info() in find_apt_mirror_info.
print "cloud.distro: %s" % cloud.distro
print " package_mirrors: %s" % cloud.distro.get_option("package_mirrors", [])
print "cloud.datasource.distro: %s" % cloud.datasource.distro
print " package_mirrors: %s" % cloud.datasource.distro.get_option("package_mirrors", [])
The issue is that the 'datasource's distro != the 'cloud's distro.
$ sudo _CLOUD_INIT_SAVE_STDOUT=1 cloud-init single --name=apt-configure --frequency=always
Cloud-init v. 0.7.1 running 'single' at Fri, 14 Dec 2012 17:35:40 +0000. Up 4808.29 seconds.
cloud.distro: <cloudinit.distros.ubuntu.Distro object at 0x166f350>
package_mirrors: [{'arches': ['i386', 'amd64'], 'failsafe': {'security': 'http://security.ubuntu.com/ubuntu', 'primary': 'http://archive.ubuntu.com/ubuntu'}, 'search': {'security': [], 'primary': ['http://bogus.invalid.com/ubuntu/']}}, {'arches': ['armhf', 'armel', 'default'], 'failsafe': {'security': 'http://ports.ubuntu.com/ubuntu-ports', 'primary': 'http://ports.ubuntu.com/ubuntu-ports'}}]
cloud.datasource.distro: <cloudinit.distros.ubuntu.Distro object at 0x1ddff90>
package_mirrors: [{'arches': ['i386', 'amd64'], 'failsafe': {'security': 'http://security.ubuntu.com/ubuntu', 'primary': 'http://archive.ubuntu.com/ubuntu'}, 'search': {'security': [], 'primary': ['http://%(ec2_region)s.ec2.archive.ubuntu.com/ubuntu/', 'http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/']}}, {'arches': ['armhf', 'armel', 'default'], 'failsafe': {'security': 'http://ports.ubuntu.com/ubuntu-ports', 'primary': 'http://ports.ubuntu.com/ubuntu-ports'}}]
ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: cloud-init 0.7.1-0ubuntu3 [modified: usr/share/pyshared/cloudinit/config/cc_apt_configure.py usr/share/pyshared/cloudinit/distros/__init__.py]
ProcVersionSignature: User Name 3.7.0-5.13-generic 3.7.0-rc8
Uname: Linux 3.7.0-5-generic x86_64
ApportVersion: 2.6.3-0ubuntu4
Architecture: amd64
Date: Fri Dec 14 17:30:01 2012
Ec2AMI: ami-0000018a
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.tiny
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
MarkForUpload: True
PackageArchitecture: all
ProcEnviron:
TERM=screen
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1090482/+subscriptions