Merge ~powersj/cloud-init:fix-apt-keyserver into cloud-init:master

Proposed by Joshua Powers on 2017-07-06
Status: Merged
Approved by: Scott Moser on 2017-07-11
Approved revision: 8628df67deb3652fa416097ef61e5ff490ef4a47
Merged at revision: 067721672570cc83d54d2c2d5677eeb79bef85e2
Proposed branch: ~powersj/cloud-init:fix-apt-keyserver
Merge into: cloud-init:master
Diff against target: 28 lines (+3/-3)
2 files modified
tests/cloud_tests/configs/modules/apt_configure_sources_keyserver.yaml (+1/-1)
tests/cloud_tests/testcases/modules/apt_configure_sources_keyserver.py (+2/-2)
Reviewer Review Type Date Requested Status
Scott Moser 2017-07-06 Approve on 2017-07-11
Server Team CI bot continuous-integration Approve on 2017-07-06
Review via email: mp+326951@code.launchpad.net

Commit Message

test: fix incorrect keyid

The test is currently importing the incorrect keyid. It specifies
the curtin developers ppa, rather than the cloud-init ppa. As of
apt in Artful, rather than a warning, not having the correct key is causing an error resulting in a test failure.

LP: #1702717

Description of the Change

Tested with:
python3 -m tests.cloud_tests run -n xenial -n artful -n zesty -n yakkety -v -t modules/apt_configure_sources_keyserver --preserve-data --data-dir output

https://paste.ubuntu.com/25033218/

To post a comment you must log in.

PASSED: Continuous integration, rev:8628df67deb3652fa416097ef61e5ff490ef4a47
https://jenkins.ubuntu.com/server/job/cloud-init-ci/30/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: CentOS 6 & 7: Build & Test
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/30/rebuild

review: Approve (continuous-integration)
Scott Moser (smoser) wrote :

So how did it work with non-artful ?

Also, lets change the short keyid to be a long keyid.

review: Needs Information
Scott Moser (smoser) wrote :

do you have an example of a fail ?

Joshua Powers (powersj) wrote :

In previous versions this is a warning:

W: GPG error: http://ppa.launchpad.net/cloud-init-dev/test-archive/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 083D06FBE4D304DF
W: The repository 'http://ppa.launchpad.net/cloud-init-dev/test-archive/ubuntu xenial InRelease' is not signed.

In artful as of last week sometime it is now an error:

W: GPG error: http://ppa.launchpad.net/cloud-init-dev/test-archive/ubuntu artful InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 083D06FBE4D304DF
E: The repository 'http://ppa.launchpad.net/cloud-init-dev/test-archive/ubuntu artful InRelease' is not signed.

Scott Moser (smoser) wrote :

It would appear this is the changelog entry:
 fail InRelease on non-404 HTTP errorcodes
that came in 1.5~alpha1.

61726d6... by Joshua Powers on 2017-07-11

Updating keyid to use fingerprint

Joshua Powers (powersj) wrote :

Updated the keyid to use the fingerprint as requested.

Updated commit message to refect both the recent change in behavior by apt and the mistake of using the wrong key.

Scott Moser (smoser) wrote :

I'm going to change to use the long fingerprint and then pull this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/cloud_tests/configs/modules/apt_configure_sources_keyserver.yaml b/tests/cloud_tests/configs/modules/apt_configure_sources_keyserver.yaml
2index 11da61e..5fe575e 100644
3--- a/tests/cloud_tests/configs/modules/apt_configure_sources_keyserver.yaml
4+++ b/tests/cloud_tests/configs/modules/apt_configure_sources_keyserver.yaml
5@@ -9,7 +9,7 @@ cloud_config: |
6 apt:
7 sources:
8 source1:
9- keyid: 0165013E
10+ keyid: 1FF0 D853 5EF7 E719 E5C8 1B9C 083D 06FB E4D3 04DF
11 keyserver: keyserver.ubuntu.com
12 source: "deb http://ppa.launchpad.net/cloud-init-dev/test-archive/ubuntu $RELEASE main"
13 collect_scripts:
14diff --git a/tests/cloud_tests/testcases/modules/apt_configure_sources_keyserver.py b/tests/cloud_tests/testcases/modules/apt_configure_sources_keyserver.py
15index 2e6b293..ddc8617 100644
16--- a/tests/cloud_tests/testcases/modules/apt_configure_sources_keyserver.py
17+++ b/tests/cloud_tests/testcases/modules/apt_configure_sources_keyserver.py
18@@ -11,8 +11,8 @@ class TestAptconfigureSourcesKeyserver(base.CloudTestCase):
19 """Test specific key added."""
20 out = self.get_data_file('apt_key_list')
21 self.assertIn(
22- '1BC3 0F71 5A3B 8612 47A8 1A5E 55FE 7C8C 0165 013E', out)
23- self.assertIn('Launchpad PPA for curtin developers', out)
24+ '1FF0 D853 5EF7 E719 E5C8 1B9C 083D 06FB E4D3 04DF', out)
25+ self.assertIn('Launchpad PPA for cloud init development team', out)
26
27 def test_source_list(self):
28 """Test source.list updated."""

Subscribers

People subscribed via source and target branches