Merge ~pjdc/ubuntu-mirror-charm/+git/ubuntu-mirror-charm:check-mirror-new-roles into ubuntu-mirror-charm:master

Proposed by Paul Collins
Status: Merged
Approved by: Paul Collins
Approved revision: ea7de6606b09519a6e22b4721fd718471bbae865
Merged at revision: 9bdf2c31429a8922da3d00e5fbcafc2cd052b86d
Proposed branch: ~pjdc/ubuntu-mirror-charm/+git/ubuntu-mirror-charm:check-mirror-new-roles
Merge into: ubuntu-mirror-charm:master
Diff against target: 63 lines (+16/-3)
2 files modified
files/check-mirror.sh (+15/-3)
hooks/hooks.py (+1/-0)
Reviewer Review Type Date Requested Status
David Lawson (community) Approve
Canonical IS Reviewers Pending
Review via email: mp+391951@code.launchpad.net

Commit message

check-mirror.sh: add maas-images and ubuntu-cloud-archive support

To post a comment you must log in.
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
David Lawson (deej) wrote :

LGTM

review: Approve
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

Change successfully merged at revision 9bdf2c31429a8922da3d00e5fbcafc2cd052b86d

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/files/check-mirror.sh b/files/check-mirror.sh
2index dde03f6..a04d177 100755
3--- a/files/check-mirror.sh
4+++ b/files/check-mirror.sh
5@@ -43,6 +43,10 @@ case ${role} in
6 unsigned=ubuntu/dists/xenial/Release
7 signed=${unsigned}.gpg
8 ;;
9+ ubuntu-cloud-archive)
10+ unsigned=ubuntu/dists/focal-updates/victoria/Release
11+ signed=${unsigned}.gpg
12+ ;;
13 releases)
14 unsigned=xenial/SHA256SUMS
15 signed=${unsigned}.gpg
16@@ -64,9 +68,15 @@ case ${role} in
17 signed=${unsigned}.gpg
18 ;;
19 simple-streams)
20+ # TODO(pjdc): key is not packaged; fetch from install hook?
21 unsigned=juju/images/releases/streams/v1/index.json
22- signed=${unsigned}.gpg
23+ signed=${unsigned}.gpg # not used
24 ;;
25+ maas-images)
26+ # NOTE(pjdc): ephemeral-v3 is the current stuff and seems to have no fixed paths to signed files we could check
27+ unsigned=ephemeral-v3/daily/focal/amd64/
28+ signed=${unsigned}.gpg # not used
29+ ;;
30 *)
31 echo "Unknown mirror role, ${role}"
32 exit 2
33@@ -76,8 +86,7 @@ tmpsigned=${tmpdir}/$(basename ${signed})
34 tmpunsigned=${tmpdir}/$(basename ${unsigned})
35
36 case ${role} in
37- # TODO(pjdc): Key is not packaged; fetch from install hook?
38- simple-streams)
39+ maas-images|simple-streams)
40 for ipaddr in $@; do
41 if ! curl -s -o"${tmpunsigned}" --resolve ${urlhost}:${port}:${ipaddr} "${scheme}://${urlhost}/${unsigned}"; then
42 echo "Mirror CRITICAL [${unsigned} failed to fetch from ${ipaddr} for ${scheme}://${urlhost}/]"
43@@ -93,6 +102,9 @@ case ${role} in
44 old-releases)
45 keyring_file=/usr/share/keyrings/ubuntu-archive-removed-keys.gpg
46 ;;
47+ ubuntu-cloud-archive)
48+ keyring_file=/usr/share/keyrings/ubuntu-cloud-keyring.gpg
49+ ;;
50 *)
51 keyring_file=/usr/share/keyrings/ubuntu-archive-keyring.gpg
52 ;;
53diff --git a/hooks/hooks.py b/hooks/hooks.py
54index 824fc28..5bf370c 100755
55--- a/hooks/hooks.py
56+++ b/hooks/hooks.py
57@@ -67,6 +67,7 @@ required_pkgs = [
58 'procmail', # provides lockfile
59 'rsync',
60 'vsftpd',
61+ 'ubuntu-cloud-keyring', # for check-mirror.sh
62 'xinetd',
63 ]
64

Subscribers

People subscribed via source and target branches