New CloudStack DS_MAYBE result causing inadvertent cloud-init runs

Bug #2039453 reported by James Falcon
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Fix Released
Critical
Unassigned
Focal
Fix Released
Critical
Unassigned
Jammy
Fix Released
Critical
Unassigned
Lunar
Fix Released
Critical
Unassigned
Mantic
Fix Released
Critical
Unassigned

Bug Description

=== Begin SRU Template ===
[Impact]
In 23.3, ds-identify automatically returns CloudStack to be DS_MAYBE on VMWare and Xen instances. On instances running on VMWare and Xen that have never identified a datasource, this causes cloud-init to run for the first time where it would have otherwise been disabled.

The fix is to revert https://github.com/canonical/cloud-init/commit/7949bb3de352dc40c62c38a0534722b24b7eed22 .

[Test Case]
* Create a VMWare instance that will be detected as DataSourceNone
* Verify that the instance does not attempt to detect the CloudStack datasource

Since it may not be possible to "naturally" get DataSourceNone, the following procedure will also work:
- Launch VMware vSphere instance
- For affected systems, ensure cloud-init version at 23.3.1-0ubuntu1 (with variable series suffix)
- For fixed systems, ensure cloud-init is using proposed
- Remove 'VMware' from /etc/cloud/cloud.cfg.d/90-dpkg.cfg # This is because under our vSphere environment, VMWare datasource is always recognized...but this isn't true in other VMWare environments
- Run `cloud-init clean --logs && rm -rf /run/cloud-init/*` # This is to simulate a fresh boot
- Run `/lib/systemd/systemd-generators/cloud-init-generator` # As would run in early boot
- On affected systems, ensure /run/cloud-init/cloud.cfg contains `datasource_list: [ CloudStack, None ]` and `/run/cloud-init/enabled` exists
- On fixed systems, ensure /run/cloud-init/cloud.cfg does not contain `CloudStack` and `/run/cloud-init/disabled` exists
- Run `cloud-init init`
- On affected systems, logs will contain `Seeing if we can get any data from <class 'cloudinit.sources.DataSourceCloudStack.DataSourceCloudStack'>`
- On fixed systems, logs will not contain `DataSourceCloudStack`

[Regression Potential]
This will cause problems for anybody already using the new behavior. Otherwise, since this is a revert of a commit adding new behavior, I don't see any other regression potential.

[Other info]
Upstream bug: https://github.com/canonical/cloud-init/issues/4501

James Falcon (falcojr)
Changed in cloud-init (Ubuntu Mantic):
importance: Undecided → Critical
Changed in cloud-init (Ubuntu Lunar):
importance: Undecided → Critical
Changed in cloud-init (Ubuntu Jammy):
importance: Undecided → Critical
Changed in cloud-init (Ubuntu Focal):
importance: Undecided → Critical
Revision history for this message
Chad Smith (chad.smith) wrote :

Upstream commit landed for this revert https://github.com/canonical/cloud-init/commit/d0f00bd54649e527d69ad597cbcad6efa8548e58 expected in 23.3.3 Mantic/Lunar/Jammy/Focal

Changed in cloud-init (Ubuntu Mantic):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cloud-init (Ubuntu Focal):
status: New → Confirmed
Changed in cloud-init (Ubuntu Jammy):
status: New → Confirmed
Changed in cloud-init (Ubuntu Lunar):
status: New → Confirmed
Revision history for this message
Steve Langasek (vorlon) wrote :

we appear to be missing the corresponding upload in noble.

Changed in cloud-init (Ubuntu Mantic):
status: Fix Committed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 23.4~3g0cb0b80f-0ubuntu1

---------------
cloud-init (23.4~3g0cb0b80f-0ubuntu1) noble; urgency=medium

  * d/p/do-not-block-user-login.patch:
    - Revert behavior, allow user login after cloud-init stage (LP: #2039505)
  * d/control: add python3-apt as Recommends to read APT config from apt_pkg
  * drop the following cherry-picks now included:
    + d/p/cpick-0d9f149a-Pytestify-apt-config-test-modules-4424
    + d/p/cpick-5023e9f9-Refactor-test_apt_source_v1.py-to-use-pytest-4427
    + d/p/cpick-e9cdd7e3-Install-gnupg-if-gpg-not-found-4431
    + d/p/cpick-015543d3-apt-install-software-properties-common-when-absent-but
  * Upstream snapshot based on upstream/main at 0cb0b80f.
    - Bugs fixed in this snapshot: (LP: #2034273, #2030729)
      (LP: #2038945, #2039453)

 -- Chad Smith <email address hidden> Wed, 08 Nov 2023 22:24:09 -0700

Changed in cloud-init (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Chad Smith (chad.smith) wrote :

The upload has take place containing upstream changes in nobel which are also represented in this upload to mantic.

Changed in cloud-init (Ubuntu Mantic):
status: Incomplete → Confirmed
Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):

Personally, I would have no idea how to perform the proposed [test plan]. Which might also make it harder to verify later that the test plan was followed correctly. It would help if more details could be given, but I understand some previous knowledge of cloud-init and vmware has to be assumed. I mean, creating a vmware instance is fine, but how do I make it "be detected as DataSourceNone", for example?

It will boil down to how the verification will be demonstrated later on.

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Please test proposed package

Hello James, or anyone else affected,

Accepted cloud-init into mantic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.3.3-0ubuntu0~23.10.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 on 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, what testing has been performed on the package and change the tag from verification-needed-mantic to verification-done-mantic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-mantic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in cloud-init (Ubuntu Mantic):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-mantic
Changed in cloud-init (Ubuntu Lunar):
status: Confirmed → Fix Committed
tags: added: verification-needed-lunar
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello James, or anyone else affected,

Accepted cloud-init into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.3.3-0ubuntu0~23.04.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 on 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, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

As a general remark, for hotfixes such as this, I would have expected the d/changelog entry to contain a brief description of the fix, instead of pointing at the upstream release notes (which contain a brief description of the sole change in the new upstream release). It's a level of indirection I wasn't expecting for this case.

Changed in cloud-init (Ubuntu Jammy):
status: Confirmed → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello James, or anyone else affected,

Accepted cloud-init into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.3.3-0ubuntu0~22.04.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 on 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, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in cloud-init (Ubuntu Focal):
status: Confirmed → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello James, or anyone else affected,

Accepted cloud-init into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.3.3-0ubuntu0~20.04.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 on 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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

James Falcon (falcojr)
description: updated
Revision history for this message
Chad Smith (chad.smith) wrote :

VMWare employees have validated both this regressed behavior in current cloud-init and the fix in Jammy and Focal.

WMware representative >>
"""
I see no issues with cloud-init 23.3.daily build on both Jammy and Focal.

    I do reproduce the bug on cloud-init 23.3.1 and verify it’s gone on cloud-init 23.3.daily. Thanks for the reverting.
    I see data can pass through guestinfo(by govc) and customization configuration to cloud-init and cloud-init loads data correctly.
""""

Also, this fix is a revert to the original behavior prior to commit https://github.com/canonical/cloud-init/commit/7949bb3de352dc40c62c38a0534722b24b7eed22. So, we don't risk exposure of regression to any paths other than to XenServer/XCP-ng here which was formerly not supported.

XenServer/XCP-ng images which need to detect CloudStack datasource would need to provide supplemental configuration for the CloudStack datasource with a config file such as /etc/cloud/cloud.cfg.d/90-set-cloudstack.cfg containing the content:
datasource_list: [CloudStack]

Until the XenServer/XCP-ng platform provides distinct information via SMBIOS or environmental artifacts, ds-identify cannot specifically detect CloudStack on XenServer/XCP-ng platforms which represent the platform as VMware.

Chad Smith (chad.smith)
Changed in cloud-init (Ubuntu Jammy):
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Changed in cloud-init (Ubuntu Lunar):
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
tags: added: verification-done-focal verification-done-jammy
removed: verification-needed-focal verification-needed-jammy
Revision history for this message
Chad Smith (chad.smith) wrote :

Marking as verification node for lunar and mantic interim as this revert is is the same reverted behavior on all releases and we've gotten approval from VMWare regarding this changeset

tags: added: verification-done verification-done-lunar verification-done-mantic
removed: verification-needed verification-needed-lunar verification-needed-mantic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 23.3.3-0ubuntu0~23.10.1

---------------
cloud-init (23.3.3-0ubuntu0~23.10.1) mantic; urgency=medium

  * Upstream snapshot based on 23.3.3. (LP: #2040291).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.3.3/ChangeLog

cloud-init (23.3.2-0ubuntu0~23.10.1) mantic; urgency=medium

  [ Brett Holman ]
  * d/p/do-not-block-user-login.patch:
    - Revert behavior, allow user login after cloud-init stage (LP: #2039505)
  * cherry-pick 2ab1f340: fix(cc_apt_configure): avoid unneeded call to
    apt-get update (LP: #2039621)
  * Upstream snapshot based on 23.3.2. (LP: #2039453).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.3.2/ChangeLog

 -- James Falcon <email address hidden> Tue, 24 Oct 2023 10:43:22 -0500

Changed in cloud-init (Ubuntu Mantic):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Update Released

The verification of the Stable Release Update for cloud-init has completed successfully and the package is now being 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 regressions.

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

This bug was fixed in the package cloud-init - 23.3.3-0ubuntu0~23.04.1

---------------
cloud-init (23.3.3-0ubuntu0~23.04.1) lunar; urgency=medium

  * Upstream snapshot based on 23.3.3. (LP: #2040291).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.3.3/ChangeLog

cloud-init (23.3.2-0ubuntu0~23.04.1) lunar; urgency=medium

  * d/p/do-not-block-user-login.patch:
    - Revert behavior, allow user login after cloud-init stage (LP: #2039505)
  * Upstream snapshot based on 23.3.2. (LP: #2039453).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.3.2/ChangeLog

 -- James Falcon <email address hidden> Tue, 24 Oct 2023 10:47:46 -0500

Changed in cloud-init (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 23.3.3-0ubuntu0~22.04.1

---------------
cloud-init (23.3.3-0ubuntu0~22.04.1) jammy; urgency=medium

  * Upstream snapshot based on 23.3.3. (LP: #2040291).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.3.3/ChangeLog

cloud-init (23.3.2-0ubuntu0~22.04.1) jammy; urgency=medium

  * d/p/do-not-block-user-login.patch:
    - Revert behavior, allow user login after cloud-init stage (LP: #2039505)
  * Upstream snapshot based on 23.3.2. (LP: #2039453).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.3.2/ChangeLog

 -- James Falcon <email address hidden> Tue, 24 Oct 2023 10:50:55 -0500

Changed in cloud-init (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 23.3.3-0ubuntu0~20.04.1

---------------
cloud-init (23.3.3-0ubuntu0~20.04.1) focal; urgency=medium

  * Upstream snapshot based on 23.3.3. (LP: #2040291).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.3.3/ChangeLog

cloud-init (23.3.2-0ubuntu0~20.04.1) focal; urgency=medium

  * d/p/do-not-block-user-login.patch:
    - Revert behavior, allow user login after cloud-init stage (LP: #2039505)
  * Upstream snapshot based on 23.3.2. (LP: #2039453).
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.3.2/ChangeLog

 -- James Falcon <email address hidden> Tue, 24 Oct 2023 10:59:56 -0500

Changed in cloud-init (Ubuntu Focal):
status: Fix Committed → Fix Released
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.