[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Changed in: cloud-init (Ubuntu Precise) Assignee: Ben Howard (utlemming) => (unassigned) -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Changed in: cloud-init (Ubuntu Precise) Importance: Critical => High ** Changed in: cloud-init (Ubuntu Vivid) Status: New => Won't Fix -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Changed in: cloud-init Status: In Progress => Fix Released -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
This bug was fixed in the package cloud-init - 0.7.7~bzr1149-0ubuntu5 --- cloud-init (0.7.7~bzr1149-0ubuntu5) wily; urgency=medium * Microsoft Azure: use stable VM instance ID over SharedConfig.xml (LP: #1506187): - d/patches/lp-1506187-azure_use_unique_vm_id.patch: use DMI data for the stable VM instance ID - d/cloud-init.preinst: migrate existing instances to stable VM instance ID on upgrade from prior versions of cloud-init. -- Ben Howard Fri, 20 Nov 2015 17:26:09 -0700 ** Changed in: cloud-init (Ubuntu Wily) Status: Fix Committed => Fix Released -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
This bug was fixed in the package cloud-init - 0.7.5-0ubuntu1.15 --- cloud-init (0.7.5-0ubuntu1.15) trusty; urgency=medium * Microsoft Azure: - d/patches/lp-1506244-azure-ssh-key-values.patch: AZURE: Add support and preference for fabric provided public SSH public key values over fingerprints (LP: #1506244). - use stable VM instance ID over SharedConfig.xml (LP: #1506187): - d/patches/lp-1506187-azure_use_unique_vm_id.patch: use DMI data for the stable VM instance ID - d/cloud-init.preinst: migrate existing instances to stable VM instance ID on upgrade from prior versions of cloud-init. -- Ben Howard Tue, 17 Nov 2015 10:02:24 -0700 ** Changed in: cloud-init (Ubuntu Trusty) Status: Fix Committed => Fix Released -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
Verified for 15.10 and 14.04. ** Tags removed: verification-needed ** Tags added: verification-done verification-done-wily -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
Hello Stephen, or anyone else affected, Accepted cloud-init into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud- init/0.7.7~bzr1149-0ubuntu5 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 Wily) Status: New => Fix Committed ** Tags added: verification-needed -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Tags removed: verification-needed ** Tags added: verification-done-trusty -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
I tested cloud-init 0.7.5-0ubuntu1.15 from -proposed for Trusty on Azure and confirmed that the new package resolves the issue. The upgrade path is also working as expected. I first created an Ubuntu 14.04 VM using ARM. After shutting down the VM via the Azure portal (portal.azure.com) and then restarting it I saw that the Instance ID changed (you can see this in /var/log/waagent.log). However, the symlink in /var/lib/cloud/instances/ that links the old Instance ID to the VM unique ID had been created, and so cloud-init did not attempt to reprovision the VM. Thanks! Steve -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Changed in: cloud-init (Ubuntu Precise) Importance: Undecided => Critical ** Changed in: cloud-init (Ubuntu Trusty) Importance: Undecided => Critical ** Changed in: cloud-init (Ubuntu Vivid) Importance: Undecided => Critical ** Changed in: cloud-init (Ubuntu Wily) Importance: Undecided => Critical -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
Hello Stephen, or anyone else affected, Accepted cloud-init into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud- init/0.7.5-0ubuntu1.15 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 Trusty) Status: New => Fix Committed ** Tags added: verification-needed -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
This bug was fixed in the package cloud-init - 0.7.7~bzr1156-0ubuntu1 --- cloud-init (0.7.7~bzr1156-0ubuntu1) xenial; urgency=medium * New upstream snapshot. * d/cloud-init.preinst: migrate Azure instance ID from old ID to stable ID (LP: #1506187). -- Ben Howard Tue, 17 Nov 2015 11:59:49 -0700 ** Changed in: cloud-init (Ubuntu Xenial) Status: Confirmed => Fix Released -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Branch linked: lp:~smoser/ubuntu/xenial/cloud-init/lp1506187 -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Branch linked: lp:cloud-init -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
Attached debdiff of all patch and logic applied for instance ID migration. ** Patch added: "debdiff for testing" https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1506187/+attachment/4521522/+files/bzr1155-bzr1156-deb.diff ** Changed in: cloud-init (Ubuntu Precise) Assignee: (unassigned) => Ben Howard (utlemming) ** Changed in: cloud-init (Ubuntu Trusty) Assignee: (unassigned) => Ben Howard (utlemming) ** Changed in: cloud-init (Ubuntu Vivid) Assignee: (unassigned) => Ben Howard (utlemming) ** Changed in: cloud-init (Ubuntu Wily) Assignee: (unassigned) => Ben Howard (utlemming) -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
Per feedback, instance migration logic is proposed to be in the preinst. ** Patch added: "diff for cloud-init.preinst.diff" https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1506187/+attachment/4521521/+files/cloud-init.preinst.diff -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Patch added: "debdiff of applied patches for Xenial" https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1506187/+attachment/4521457/+files/applied-deb.diff -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Tags added: patch -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
During review of the proposed patch, the concern was raised that cloud- init will migrate to using the new instance ID and thus run first-boot provisioning. In order to mitigate this, cloud-init needs to migrate existing instances to the new instance ID during installation of the upgraded package. Attached patch is proposed for debian/cloud-init.postinst ** Description changed: - The Azure datasource currently uses the InstanceID from the - SharedConfig.xml file. On our new CRP stack, this ID is not guaranteed - to be stable and could change if the VM is deallocated. If the - InstanceID changes then cloud-init will attempt to reprovision the VM, - which could result in temporary loss of access to the VM. + SRU JUSTIFICATION + + [IMPACT] On Azure, the InstanceID is currently detected via a fabric + provided XML file. With the new CRP stack, this ID is not guaranteed to + be stable. As a result instances may go re-provision upon reboot. + + [FIX] Use DMI data to detect the instance ID and migrate existing + instances to the new ID. + + [REGRESSION POTENTIAL] The fix is both in the cloud-init code and in the + packaging. If the instance ID is not properly migrated, then a reboot + may trigger re-provisioning. + + [TEST CASES] + 1. Boot instance on Azure. + 2. Apply cloud-init from -proposed. A migration message should apply. + 3. Get the new instance ID: +$ sudo cat /sys/class/dmi/id/product_uuid + 4. Confirm that /var/lib/cloud/instance is a symlink to /var/lib/cloud/instances/ + 5. Re-install cloud-init and confirm that migration message is NOT displayed. + + [TEST CASE 2] + 1. Build new cloud-image from -proposed + 2. Boot up instance + 3. Confirm that /sys/class/dmi/id/product_uuid is used to get instance ID (see /var/log/cloud-init.log) + + + [ORIGINAL REPORT] + The Azure datasource currently uses the InstanceID from the SharedConfig.xml file. On our new CRP stack, this ID is not guaranteed to be stable and could change if the VM is deallocated. If the InstanceID changes then cloud-init will attempt to reprovision the VM, which could result in temporary loss of access to the VM. Instead cloud-init should switch to use the VM Unique ID, which is guaranteed to be stable everywhere for the lifetime of the VM. The VM unique ID is explained here: https://azure.microsoft.com/en-us/blog /accessing-and-using-azure-vm-unique-id/ In short, the unique ID is available via DMI, and can be accessed with the command 'dmidecode | grep UUID' or even easier via sysfs in the file "/sys/devices/virtual/dmi/id/product_uuid". Steve ** Patch added: "cloud-init postinst patch for applying new instance ID to existing instances" https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1506187/+attachment/4520856/+files/lp-1506187-postinst.diff -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Branch linked: lp:~daniel-thewatkins/cloud-init/lp1506187 -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1506187] Re: [SRU] Azure: cloud-init should use VM unique ID
** Also affects: cloud-init Importance: Undecided Status: New ** Changed in: cloud-init Status: New => In Progress ** Changed in: cloud-init Assignee: (unassigned) => Dan Watkins (daniel-thewatkins) ** Changed in: cloud-init (Ubuntu Xenial) Assignee: Dan Watkins (daniel-thewatkins) => (unassigned) -- 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/1506187 Title: [SRU] Azure: cloud-init should use VM unique ID To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1506187/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs