Skip to content

bionic: cherry pick 4f62ae8#765

Merged
OddBloke merged 4 commits into
canonical:ubuntu/bionicfrom
OddBloke:ubuntu/bionic
Jan 11, 2021
Merged

bionic: cherry pick 4f62ae8#765
OddBloke merged 4 commits into
canonical:ubuntu/bionicfrom
OddBloke:ubuntu/bionic

Conversation

@OddBloke
Copy link
Copy Markdown
Collaborator

No description provided.

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. tooling diff minor between authors:
diff --git a/debian/changelog b/debian/changelog
index 170dadba..79b21057 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,7 +3,7 @@ cloud-init (20.4-0ubuntu1~18.04.2) bionic; 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:31:19 -0500
+ -- Chad Smith <chad.smith@canonical.com>  Mon, 11 Jan 2021 15:25:54 -0700
 
 cloud-init (20.4-0ubuntu1~18.04.1) bionic; urgency=medium
 
  1. build-package succeeds
  2. sbuilt-it succeeds
  3. quilt push -a/pop -a succeeds with appropriate functional diff
csmith@downtown:/tmp/cloud-init (ubuntu/bionic)$ git diff cloudinit/sources/DataSourceAzure.py
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 04ff2131..647e3d28 100755
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -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
Copy link
Copy Markdown
Collaborator Author

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

@OddBloke OddBloke merged commit ffee10c into canonical:ubuntu/bionic Jan 11, 2021
@OddBloke OddBloke deleted the ubuntu/bionic branch January 11, 2021 22:53
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