Oracle: cloud-init openstack local detection too strict for oracle cloud
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Chad Smith | ||
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
=== 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://
echo deb \$mirror \$(lsb_release -sc)-proposed main | tee /etc/apt/
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:/
=== End SRU Template ===
=== Original Description ===
cloud-init 18.3 cannot detect OpenStack datasource on Oracle cloud across reboots.
18.2 properly detects DataSourceOpens
- DMI system-product_name in ['OpenStack Nova', 'OpenStack Compute']
OracleCloud product-name is 'Standard PC (i440FX + PIIX, 1996)'
- DMI chassis_asset_tag in ['OpenTelekomCl
Oracle's chassis asset tag is 'OracleCloud.com'
- proc/1/
Oracle's /proc/1/environ has no product_name key:
$ sudo cat /proc/1/environ
HOME=/init=
We need a more permissive detect_openstack function to detect Oracle during cloud-init's get_data() method.
Related branches
- Server Team CI bot: Approve (continuous-integration)
- cloud-init Commiters: Pending requested
-
Diff: 96 lines (+74/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/cpick-3cee0bf8-oracle-fix-detect_openstack-to-report-True-on (+66/-0)
debian/patches/series (+1/-0)
- Server Team CI bot: Approve (continuous-integration)
- cloud-init Commiters: Pending requested
-
Diff: 94 lines (+74/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/cpick-3cee0bf8-oracle-fix-detect_openstack-to-report-True-on (+66/-0)
debian/patches/series (+1/-0)
- Server Team CI bot: Approve (continuous-integration)
- cloud-init Commiters: Pending requested
-
Diff: 94 lines (+74/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/cpick-3cee0bf8-oracle-fix-detect_openstack-to-report-True-on (+66/-0)
debian/patches/series (+1/-0)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 1008 lines (+356/-145)18 files modifiedcloudinit/config/cc_lxd.py (+8/-8)
cloudinit/config/cc_rh_subscription.py (+22/-21)
cloudinit/sources/DataSourceOpenStack.py (+2/-1)
cloudinit/sources/DataSourceSmartOS.py (+1/-1)
cloudinit/sources/__init__.py (+7/-5)
cloudinit/sources/tests/test_init.py (+2/-1)
cloudinit/tests/test_util.py (+76/-2)
cloudinit/util.py (+33/-1)
cloudinit/warnings.py (+1/-1)
debian/changelog (+16/-0)
integration-requirements.txt (+1/-1)
tests/cloud_tests/platforms/instances.py (+2/-1)
tests/cloud_tests/platforms/lxd/instance.py (+38/-4)
tests/cloud_tests/setup_image.py (+9/-1)
tests/cloud_tests/testcases.yaml (+4/-0)
tests/unittests/test_datasource/test_openstack.py (+18/-0)
tests/unittests/test_rh_subscription.py (+92/-93)
tools/net-convert.py (+24/-4)
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Approve
-
Diff: 43 lines (+20/-1)2 files modifiedcloudinit/sources/DataSourceOpenStack.py (+2/-1)
tests/unittests/test_datasource/test_openstack.py (+18/-0)
Changed in cloud-init: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Chad Smith (chad.smith) |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
description: | updated |
tags: | added: regression-proposed |
description: | updated |
tags: |
added: verification-done-bionic removed: verification-needed-bionic |
description: | updated |
This bug is fixed with commit 3cee0bf8 to cloud-init on branch master. /git.launchpad. net/cloud- init/commit/ ?id=3cee0bf8
To view that commit see the following URL:
https:/