diff options
author | Chad Smith <chad.smith@canonical.com> | 2021-02-19 15:37:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-19 15:37:57 -0700 |
commit | 66e2d42dd1b722dc8e59f4e5990cea54f81ccd2a (patch) | |
tree | da3d84ce220872f47c42210bb59a2fce58883cb8 /tests/integration_tests/instances.py | |
parent | 08d8902a95407d1f313ba1c679145d5f6b0df455 (diff) | |
download | vyos-cloud-init-66e2d42dd1b722dc8e59f4e5990cea54f81ccd2a.tar.gz vyos-cloud-init-66e2d42dd1b722dc8e59f4e5990cea54f81ccd2a.zip |
azure: case-insensitive UUID to avoid new IID during kernel upgrade (#798)
Kernel's newer than 4.15 present /sys/dmi/id/product_uuid as a
lowercase value. Previously UUID was uppercase.
Azure datasource reads the product_uuid directly as their platform's
instance-id. This presents a problem if a kernel is either
upgraded or downgraded across the 4.15 kernel version boundary because
the case of the UUID will change, resulting in cloud-init seeing a
"new" instance id and re-running all modules.
Re-running cc_ssh in cloud-init deletes and regenerates ssh_host keys
on a system which can cause concern on long-running instances that
somethingnefarious has happened.
Also add:
- An integration test for this for Azure Bionic Ubuntu FIPS upgrading from
a FIPS kernel with uppercase UUID to a lowercase UUID in linux-azure
- A new pytest.mark.sru_next to collect all integration tests related to our
next SRU
LP: #1835584
Diffstat (limited to 'tests/integration_tests/instances.py')
-rw-r--r-- | tests/integration_tests/instances.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/integration_tests/instances.py b/tests/integration_tests/instances.py index 0d9852c3..055ec758 100644 --- a/tests/integration_tests/instances.py +++ b/tests/integration_tests/instances.py @@ -116,7 +116,8 @@ class IntegrationInstance: def install_new_cloud_init( self, source: CloudInitSource, - take_snapshot=True + take_snapshot=True, + clean=True, ): if source == CloudInitSource.DEB_PACKAGE: self.install_deb() @@ -133,7 +134,8 @@ class IntegrationInstance: ) version = self.execute('cloud-init -v').split()[-1] log.info('Installed cloud-init version: %s', version) - self.instance.clean() + if clean: + self.instance.clean() if take_snapshot: snapshot_id = self.snapshot() self.cloud.snapshot_id = snapshot_id |