Skip to content

xenial: cherry pick 4f62ae8#767

Merged
OddBloke merged 3 commits into
canonical:ubuntu/xenialfrom
OddBloke:ubuntu/xenial
Jan 11, 2021
Merged

xenial: cherry pick 4f62ae8#767
OddBloke merged 3 commits into
canonical:ubuntu/xenialfrom
OddBloke:ubuntu/xenial

Conversation

@OddBloke
Copy link
Copy Markdown
Collaborator

No description provided.

@OddBloke
Copy link
Copy Markdown
Collaborator Author

I've confirmed this works using my test from #761.

Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM:

  1. minor authorship diff
diff --git a/debian/changelog b/debian/changelog
index c6114ae7..2d8de46a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,7 +3,7 @@ cloud-init (20.4-0ubuntu1~16.04.2) xenial; urgency=medium
   * cherry-pick 4f62ae8d: Fix regression with handling of IMDS ssh keys
     (#760) (LP: #1910835)
 
- -- Daniel Watkins <oddbloke@ubuntu.com>  Mon, 11 Jan 2021 17:41:09 -0500
+ -- Chad Smith <chad.smith@canonical.com>  Mon, 11 Jan 2021 15:26:17 -0700
 
 cloud-init (20.4-0ubuntu1~16.04.1) xenial; urgency=medium
 
  1. build-package succeeds
  2. sbuilt-id succeeds
  3. quilt push -a applies the right functional diff and quilt pop -a removes cleanly
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 04ff2131..d7f318c7 100755
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -266,7 +266,7 @@ BUILTIN_DS_CONFIG = {
     },
     'disk_aliases': {'ephemeral0': RESOURCE_DISK_PATH},
     'dhclient_lease_file': LEASE_FILE,
-    'apply_network_config': True,  # Use IMDS published network configuration
+    'apply_network_config': False,  # Use fallback network config not IMDS
 }
 # RELEASE_BLOCKER: Xenial and earlier apply_network_config default is False
 
@@ -651,6 +651,10 @@ class DataSourceAzure(sources.DataSource):
         LOG.debug('Retrieving public SSH keys')
         ssh_keys = []
         try:
+            raise KeyError(
+                "Not using public SSH keys from IMDS"
+            )
+            # pylint:disable=unreachable
             ssh_keys = [
                 public_key['keyData']
                 for public_key
@@ -1271,6 +1275,10 @@ class DataSourceAzure(sources.DataSource):
 
             pubkey_info = None
             try:
+                raise KeyError(
+                    "Not using public SSH keys from IMDS"
+                )
+                # pylint:disable=unreachable
                 public_keys = self.metadata['imds']['compute']['publicKeys']
                 LOG.debug(
                     'Successfully retrieved %s key(s) from IMDS',

@OddBloke OddBloke merged commit 058a35e into canonical:ubuntu/xenial Jan 11, 2021
@OddBloke OddBloke deleted the ubuntu/xenial branch January 11, 2021 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants