Cloud-init modules do not reflect loaded config

Bug #1076811 reported by Joshua Harlow
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
High
Joshua Harlow
cloud-init (Ubuntu)
Fix Released
High
Unassigned
Precise
Invalid
Low
Unassigned
Quantal
Fix Released
High
Scott Moser
Raring
Fix Released
High
Unassigned

Bug Description

=== Begin SRU Information ===
[Impact]
 * if a user passes in cloud-config containing 'system_info', these changes
   do not get applied. The biggest fallout of this is that
   the user cannot change the mirrors that are present in the built
   in config.

[Test Case]
 * Launch an instance with user-data containing:
   #cloud-config
   system_info:
    package_mirrors:
     - arches: [i386, amd64]
       failsafe:
         primary: http://us.archive.ubuntu.com/ubuntu
       search:
         primary:
           - http://us.archive.ubuntu.com/ubuntu
 * verify that mirror 'us.archive.ubuntu.com' is not used in
   /etc/apt/sources.list as it should be.

[Regression Potential]
 * The editing of system_info is broken. This is unlikely to make
   the situation worse.

=== End SRU Information ===

After cloud-init consumes its userdata, it continues using the initial userdata/system config and distro objects, and does not force them to be reloaded so modules about to be ran (or modules which will use the distro) will reflect this new data. After the program exits and the next 'stage' runs that stage though does reload the configuration correctly. It needs to be fixed for the init stage.

Related branches

Joshua Harlow (harlowja)
Changed in cloud-init:
assignee: nobody → Joshua Harlow (harlowja)
Revision history for this message
Scott Moser (smoser) wrote :

Just marking this explicitly that it does not affect 12.04/precise. The bug was only in 0.7.X series.

Changed in cloud-init:
status: New → Triaged
importance: Undecided → High
Changed in cloud-init (Ubuntu Precise):
importance: Undecided → Low
status: New → Fix Released
Revision history for this message
Joshua Harlow (harlowja) wrote :

Also it only affects the 'system_info' section due to the distro object not being forced to be regenerated with the new loaded config. Other configs (for modules) will reflect the new userdata when ran.

Changed in cloud-init:
status: Triaged → Fix Committed
Scott Moser (smoser)
Changed in cloud-init (Ubuntu Quantal):
status: New → Triaged
Changed in cloud-init (Ubuntu Raring):
status: New → Triaged
Changed in cloud-init (Ubuntu Quantal):
importance: Undecided → High
Changed in cloud-init (Ubuntu Raring):
importance: Undecided → High
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.1-0ubuntu1

---------------
cloud-init (0.7.1-0ubuntu1) raring; urgency=low

  * New upstream release.
    * landscape: install landscape-client package if not installed.
      only take action if cloud-config is present (LP: #1066115)
    * landscape: restart landscape after install or config (LP: #1070345)
    * multipart/archive: do not fail on unknown headers in multipart
      mime or cloud-archive config (LP: #1065116).
    * tools/Z99-cloud-locale-test.sh: avoid warning when user's shell is
      zsh (LP: #1073077)
    * fix stack trace when unknown user-data input had unicode (LP: #1075756)
    * split 'apt-update-upgrade' config module into 'apt-configure' and
      'package-update-upgrade-install'. The 'package-update-upgrade-install'
      will be a cross distro module.
    * fix bug where cloud-config from user-data could not affect system_info
      settings (LP: #1076811)
    * add yum_add_repo configuration module for adding additional yum repos
    * fix public key importing with config-drive-v2 datasource (LP: #1077700)
    * handle renaming and fixing up of marker names (LP: #1075980)
      this relieves that burden from the distro/packaging.
    * group config: fix how group members weren't being translated correctly
      when the group: [member, member...] format was used (LP: #1077245)
    * work around an issue with boto > 0.6.0 that lazy loaded the return from
      get_instance_metadata(). This resulted in failure for cloud-init to
      install ssh keys. (LP: #1068801)
    * add power_state_change config module for shutting down stystem after
      cloud-init finishes. (LP: #1064665)
 -- Scott Moser <email address hidden> Wed, 14 Nov 2012 15:18:50 -0500

Changed in cloud-init (Ubuntu Raring):
status: Triaged → Fix Released
Scott Moser (smoser)
Changed in cloud-init (Ubuntu Precise):
status: Fix Released → Invalid
Scott Moser (smoser)
description: updated
Scott Moser (smoser)
Changed in cloud-init (Ubuntu Quantal):
status: Triaged → In Progress
assignee: nobody → Scott Moser (smoser)
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello Joshua, or anyone else affected,

Accepted cloud-init into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/cloud-init/0.7.0-0ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Quantal):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Scott Moser (smoser) wrote :

The upload cloud-init_0.7.0-0ubuntu2.2.dsc did not fully fix the issue. Some portions of the distro config (default users and such) could be changed, but others (specifically mirrors) could not.

I've opened bug 1090482 to address that, and uploaded cloud-init_0.7.0-0ubuntu2.2 to quantal-proposed with a fix.

tags: added: verification-failed
removed: verification-needed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hello Joshua, or anyone else affected,

Accepted cloud-init into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/cloud-init/0.7.0-0ubuntu2.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-failed
tags: added: verification-needed
Revision history for this message
Scott Moser (smoser) wrote :

verified in quantal upload 0.7.0-0ubuntu2.2 via the same way as https://bugs.launchpad.net/cloud-init/+bug/1006963/comments/3

tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.0-0ubuntu2.2

---------------
cloud-init (0.7.0-0ubuntu2.2) quantal-proposed; urgency=low

  * debian/patches/lp-1090482-fix-cloud-config-mirrors.patch:
    fix issue with cloud-config data in user-data providing mirror
    info (LP: #1073077)

cloud-init (0.7.0-0ubuntu2.1) quantal-proposed; urgency=low

  * debian/patches/lp-1073077-zsh-workaround-for-locale_warn.patch: avoid
    warning when user's shell is zsh (LP: #1073077)
  * debian/patches/lp-1077700-config-drive-fix-ssh-authorized-keys.patch:
    fix bug in config-drive-v2 usage of authoried keys (LP: #1077700)
  * debian/patches/lp-1080985-fix-resize-root-noblock.patch:
    fix 'resize_root: noblock' (LP: #1080985)
  * debian/patches/lp-1076811-fix-userdata-update-to-distro-config.patch:
    fix updates to distro config via user-data. (LP: #1076811)
  * debian/patches/lp-1066115-install-landscape-if-needed.patch:
    fix permissions on landscape config, and ensure landscape client
    is installed if landscape config is given. (LP: #1066115)
  * debian/patches/lp-1070345-restart-landscape-if-needed.patch:
    restart the landscape-client if changes to config were made. (LP: #1070345)
  * debian/patches/lp-1077020-fix-ca-certificates-blanklines.patch: fix
    adding of empty lines in ca-certificates file (LP: #1077020)
 -- Scott Moser <email address hidden> Mon, 17 Dec 2012 10:15:03 -0500

Changed in cloud-init (Ubuntu Quantal):
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.