Merge ~philroche/maas-images:feature/esm-image-sync-support into maas-images:master

Proposed by Philip Roche
Status: Merged
Merge reported by: Lee Trager
Merged at revision: 4287d3f7be17dcd6b900302f4a180887944bc95e
Proposed branch: ~philroche/maas-images:feature/esm-image-sync-support
Merge into: maas-images:master
Diff against target: 55 lines (+13/-1)
2 files modified
meph2/commands/cloudimg_sync.py (+2/-1)
meph2/ubuntu_info.py (+11/-0)
Reviewer Review Type Date Requested Status
Lee Trager (community) Approve
Andres Rodriguez (community) Approve
Robert C Jennings (community) Approve
David Krauser (community) Approve
Review via email: mp+366852@code.launchpad.net

Commit message

Add support for syncing images that are no longer receiving regular support

.. but are receiving ESM support. I found this issue with when trying to sync a
final Trusty release after it entered ESM support.

Description of the change

Add support for syncing images that are no longer receiving regular support

.. but are receiving ESM support. I found this issue with when trying to sync a
final Trusty release after it entered ESM support.

To post a comment you must log in.
Revision history for this message
David Krauser (davidkrauser) :
review: Approve
Revision history for this message
Robert C Jennings (rcj) wrote :

Looks good to me Phil. Thanks for ensuring we can deliver these during Trusty ESM as necessary.

review: Approve
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Can you expand what do you mean by "when trying to sync a final Trusty release" ? Where are you syncing images and how? Because we have not dropped trusty from the available images for MAAS this code produces.

IS there a bug report where to understand the context?

review: Needs Information
Revision history for this message
Philip Roche (philroche) wrote :

@andreserl The issue is that no further Trusty images would be added to streams or synced to http://images.maas.io/ephemeral-v3/daily/trusty/

See

https://cloud-images-jenkins.canonical.com/job/MAAS_v3_MasterBuilder/ARCH_TYPE=amd64/258/console

"ignoring unsupported release: trusty",

I have not filed a bug report. I work on the Canonical CPC team so I'm not a consumer of these images. I help in producing them.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Thanks for the context. I, however, have one more question.

As far as I understand, we are not continuing to produce new Trusty images under ESM, as there are no new images that include ESM related packages in them. As such, why would we want to allow syncing new images of ESM releases (trusty/precise in this case) if we are no longer producing new images and these images are already available in the MAAS streams?

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Also, comment inline.

review: Needs Information
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Ok, so now I see what the issue is here. The last trusty image built for MAAS was on April 11, 2019 [1]. CPC has produced a new image on April 29, 2019 (published May 1st) [2]. The job wants to build and produce a new MAAS trusty images based on this last update.

On that basis, I'm +1 on this branch. Just the comment inline should be addressed if possible.

[1]: https://images.maas.io/ephemeral-v3/daily/trusty/amd64/
[2]: http://cloud-images.ubuntu.com/trusty/20190429/ # published may 1st.

review: Approve
4287d3f... by Philip Roche

Add support_esm_eol key with details on when a releases ESM support will end

If a release does not receive ESM support (all non-LTS releases) then the esm_eol
is the same as the regular support eol.

Revision history for this message
Philip Roche (philroche) wrote :

@andreserl I have made the requested change but would like another review from you as I wasn't sure if when a release is not an ESM release (all non-LTS releases) the esm_eol should be "" or the eol date.

Revision history for this message
Lee Trager (ltrager) wrote :

I think this is fine for allowing new ESM images to be built in MAAS. Do you think this should be including the support_esm_eol field in the stream? I'm fine either way but currently that value is not propagated to the stream itself [1].

[1] http://paste.ubuntu.com/p/X8DM7xnYm6/

review: Approve
Revision history for this message
Lee Trager (ltrager) wrote :

I spoke with Andres on IRC. We agreed to land this as is and I've added another commit to include support_esm_eol in the stream.

Revision history for this message
Philip Roche (philroche) wrote :

@ltrager Thank you. We have open MPs internally in CPC about adding support_esm_eol to non MAAS streams but we have held off on merging until a final decision on how this should look across all streams is made. I believe this is to be discussed at the next management sprint in May.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/meph2/commands/cloudimg_sync.py b/meph2/commands/cloudimg_sync.py
2index e05a060..c7aec39 100755
3--- a/meph2/commands/cloudimg_sync.py
4+++ b/meph2/commands/cloudimg_sync.py
5@@ -81,7 +81,8 @@ class CloudImg2Meph2Sync(mirrors.BasicMirrorWriter):
6
7 self.releases = []
8 for r in [k['release'] for k in cfgdata['releases']]:
9- if r not in ubuntu_info.SUPPORTED:
10+ if r not in ubuntu_info.SUPPORTED and \
11+ r not in ubuntu_info.SUPPORTED_ESM:
12 LOG.info("ignoring unsupported release: %s", r)
13 else:
14 self.releases.append(r)
15diff --git a/meph2/ubuntu_info.py b/meph2/ubuntu_info.py
16index d7ab49c..032ee5f 100644
17--- a/meph2/ubuntu_info.py
18+++ b/meph2/ubuntu_info.py
19@@ -60,6 +60,7 @@ def get_ubuntu_info(date=None):
20 getall(result="release", date=date)]
21 full_codenames = [x.split('"')[1] for x in fullnames]
22 supported = udi.supported(date=date)
23+ supported_esm = udi.supported_esm(date=date)
24 try:
25 devel = udi.devel(date=date)
26 except distro_info.DistroDataOutdated as e:
27@@ -82,11 +83,20 @@ def get_ubuntu_info(date=None):
28 for i, codename in enumerate(codenames):
29 title = "%s LTS" % versions[i] if lts[i] else versions[i]
30 eol = hack_all[codename]['eol'].strftime("%Y-%m-%d")
31+
32+ if hack_all[codename]['eol_esm']:
33+ eol_esm = hack_all[codename]['eol_esm'].strftime("%Y-%m-%d")
34+ else:
35+ # If eol_esm is None then this release does not receive ESM support
36+ # As such we should set the esm_eol to the same as eol
37+ eol_esm = eol
38 release_date = hack_all[codename]['release'].strftime("%Y-%m-%d")
39 ret.append({'lts': lts[i], 'version': versions[i],
40 'supported': codename in supported,
41+ 'supported_esm': codename in supported_esm,
42 'codename': codename,
43 'support_eol': eol,
44+ 'support_esm_eol': eol_esm,
45 'release_codename': full_codenames[i],
46 'release_date': release_date,
47 'devel': bool(codename == devel),
48@@ -108,6 +118,7 @@ REL2VER = {k['codename']: k for k in get_ubuntu_info()}
49
50 LTS_RELEASES = [d for d in REL2VER if REL2VER[d]['lts']]
51 SUPPORTED = {d: v for d, v in REL2VER.items() if v['supported']}
52+SUPPORTED_ESM = {d: v for d, v in REL2VER.items() if v['supported_esm']}
53
54 if __name__ == '__main__':
55 import json

Subscribers

People subscribed via source and target branches