canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.99k stars 883 forks source link

Oracle: cloud-init openstack local detection too strict for oracle cloud #3215

Closed ubuntu-server-builder closed 1 year ago

ubuntu-server-builder commented 1 year ago

This bug was originally filed in Launchpad as LP: #1784685

Launchpad details
affected_projects = ['cloud-init (Ubuntu)', 'cloud-init (Ubuntu Xenial)', 'cloud-init (Ubuntu Bionic)']
assignee = chad.smith
assignee_name = Chad Smith
date_closed = 2018-10-02T21:13:35.377862+00:00
date_created = 2018-07-31T17:47:51.962921+00:00
date_fix_committed = 2018-07-31T18:44:18.234309+00:00
date_fix_released = 2018-10-02T21:13:35.377862+00:00
id = 1784685
importance = high
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1784685
milestone = None
owner = chad.smith
owner_name = Chad Smith
private = False
status = fix_released
submitter = chad.smith
submitter_name = Chad Smith
tags = ['regression-proposed', 'verification-done', 'verification-done-bionic', 'verification-done-xenial']
duplicates = []

Launchpad user Chad Smith(chad.smith) wrote on 2018-07-31T17:47:51.962921+00:00

=== Begin SRU Template === [Impact] Cloud-init should detect OpenStack datasource on any OracleCloud instance. Per the bug, it was falling through the DataSourceNone after upgrade to 18.3.9 and a system reboot.

[Test Case]

Deploy an Oracle cloud bionic instance and validate upgrade/reboot path

cat > setup_proposed.sh <<EOF

/bin/bash

mirror=http://archive.ubuntu.com/ubuntu echo deb \$mirror \$(lsb_release -sc)-proposed main | tee /etc/apt/sources.list.d/proposed.list apt-get update -q; apt-get install -qy cloud-init; EOF

for vm in '129.146.86.46'; do    echo '=== BEGIN ' $vm ' ==='    ssh ubuntu@$vm grep CODENAME /etc/os-release;    ssh ubuntu@$vm -- dpkg-query --show cloud-init;    ssh ubuntu@$vm -- cloud-init status --long;    ssh ubuntu@$vm -- cloud-init --version;    ssh ubuntu@$vm -- cloud-init analyze show;    scp setup_proposed.sh ubuntu@$vm:.;    ssh ubuntu@$vm sudo bash ./setup_proposed.sh 2>&1 | egrep 'cloud-init';    ssh ubuntu@$vm -- sudo cloud-init clean --logs --reboot;    echo "After clean reboot, upgrade 18.3.9 should detect OpenStackLocal datasource"    ssh-keygen -f ".ssh/known_hosts" -R $vm;    ssh ubuntu@$vm -- cloud-init status --long;    ssh ubuntu@$vm -- cloud-init --version; done

[Regression Potential] This fixes a critical issue in datasource detection on Oracle platforms only. This should not regress any other platforms and is only a minor code path change to include Oracle's DMI chassis asset tag as a valid OpenStack datasource type.

[Other Info] Upstream commit at   https://git.launchpad.net/cloud-init/commit/?id=0df2b42

=== End SRU Template ===

=== Original Description ===

cloud-init 18.3 cannot detect OpenStack datasource on Oracle cloud across reboots.

18.2 properly detects DataSourceOpenstack, but 18.3 added a detect_openstack helper function which fails to detect openstack datasource from the environment or DMI data matching a limited set of conditions:

  - DMI system-product_name in ['OpenStack Nova', 'OpenStack Compute']       OracleCloud product-name is 'Standard PC (i440FX + PIIX, 1996)'   - DMI chassis_asset_tag in ['OpenTelekomCloud']          Oracle's chassis asset tag is 'OracleCloud.com'

  - proc/1/environ:product_name == 'OpenStack Nova'        Oracle's /proc/1/environ has no product_name key: $ sudo cat /proc/1/environ HOME=/init=/sbin/initrecovery=TERM=linuxdrop_caps=BOOT_IMAGE=/boot/vmlinuz-4.15.0-29-genericPATH=/sbin:/usr/sbin:/bin:/usr/binPWD=/rootmnt=/root

We need a more permissive detect_openstack function to detect Oracle during cloud-init's get_data() method.

ubuntu-server-builder commented 1 year ago

Launchpad user Server Team CI bot(server-team-bot) wrote on 2018-07-31T18:44:17.040376+00:00

This bug is fixed with commit 3cee0bf8 to cloud-init on branch master. To view that commit see the following URL: https://git.launchpad.net/cloud-init/commit/?id=3cee0bf8

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2018-07-31T20:24:46.264044+00:00

fixed in cosmic at 18.3-18-g3cee0bf8-0ubuntu1

ubuntu-server-builder commented 1 year ago

Launchpad user Chris Halse Rogers(raof) wrote on 2018-08-01T01:34:05.122681+00:00

Hello Chad, or anyone else affected,

Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/18.3-9-g2e62cb8a-0ubuntu1~16.04.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 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 and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. 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!

ubuntu-server-builder commented 1 year ago

Launchpad user Chris Halse Rogers(raof) wrote on 2018-08-01T01:55:58.942027+00:00

Hello Chad, or anyone else affected,

Accepted cloud-init into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/18.3-9-g2e62cb8a-0ubuntu1~18.04.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 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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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!

ubuntu-server-builder commented 1 year ago

Launchpad user Chad Smith(chad.smith) wrote on 2018-08-01T19:55:54.075366+00:00

SRU regresion validation logs for Oracle bionic and xenial Launchpad attachments: lp-1784685.txt

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2018-08-08T01:56:21.499600+00:00

This bug was fixed in the package cloud-init - 18.3-9-g2e62cb8a-0ubuntu1~18.04.2


cloud-init (18.3-9-g2e62cb8a-0ubuntu1~18.04.2) bionic-proposed; urgency=medium

cloud-init (18.3-9-g2e62cb8a-0ubuntu1~18.04.1) bionic-proposed; urgency=medium

cloud-init (18.3-0ubuntu1~18.04.1) bionic-proposed; urgency=medium

ubuntu-server-builder commented 1 year ago

Launchpad user Chris Halse Rogers(raof) wrote on 2018-08-08T01:56:39.687829+00:00

The verification of the Stable Release Update for cloud-init 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 regressions.

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2018-08-08T01:57:22.720631+00:00

This bug was fixed in the package cloud-init - 18.3-9-g2e62cb8a-0ubuntu1~16.04.2


cloud-init (18.3-9-g2e62cb8a-0ubuntu1~16.04.2) xenial-proposed; urgency=medium

cloud-init (18.3-9-g2e62cb8a-0ubuntu1~16.04.1) xenial-proposed; urgency=medium

cloud-init (18.3-0ubuntu1~16.04.1) xenial-proposed; urgency=medium

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2018-10-02T21:13:37.418281+00:00

This bug is believed to be fixed in cloud-init in version 18.4. If this is still a problem for you, please make a comment and set the state back to New

Thank you.