Merge ~ahasenack/ubuntu/+source/ubuntu-advantage-tools:trusty-nonx86-ua-fix into ubuntu/+source/ubuntu-advantage-tools:ubuntu/trusty-devel

Proposed by Andreas Hasenack
Status: Merged
Merged at revision: 4ccd22fd8d17e833c40900b6ffbb5ed6f25dc8e5
Proposed branch: ~ahasenack/ubuntu/+source/ubuntu-advantage-tools:trusty-nonx86-ua-fix
Merge into: ubuntu/+source/ubuntu-advantage-tools:ubuntu/trusty-devel
Diff against target: 44 lines (+16/-1)
2 files modified
debian/changelog (+6/-0)
debian/postinst (+10/-1)
Reviewer Review Type Date Requested Status
Bryce Harrington (community) Approve
Chad Smith Pending
Review via email: mp+375564@code.launchpad.net

Description of the change

Cherry-pick of https://github.com/CanonicalLtd/ubuntu-advantage-client/commit/7353260d1a49279fb10069fd0c18011b25a1d0d8 to completely unconfigure esm during postinst on architectures other than i386 and amd64.

Bileto ticket to run DEP8 tests: https://bileto.ubuntu.com/#/ticket/3839 (still ongoing)

It has an associated ppa (still building).

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

- PPA built fine
- Changes are small and LGTM
- The SRU template on this looks complete as well
- Andreas assigned the review to you Chad, so mine is just a comment.

@Chad
If Andreas and you have made a deal how to sponsor this while he is off, then great.
If not let us know once review and tests are fully complete.

Revision history for this message
Bryce Harrington (bryce) wrote :

In The [Regression Potential] section, "It there is a change..." s/b "If there is a change..."

You might also want to add discussion about what types of symptoms testers should watch for, such as failures during apt-get update, and what types of output to look for running `ua status` (i.e. seeing 'enabled' displayed for esm-infra on architectures it shouldn't, etc.)

As to the code changes for this merge proposal, I have no improvements to suggest, they look good.

Bileto appears to have run successfully, and tests are green.

I'm setting up an lxc container to test things before uploading.

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

The first test case gave a warning about a missing .json file, don't know if that's expected or not, but the test seemed to complete ok otherwise:

-- BEGIN test 1c: Confirm ua-contract architecture deltas don't unattach/disable esm on supported platforms
Introduce a fake architecture delta by modifying the cache machine token
sed: can't read /var/lib/ubuntu-advantage/private/machine-access-esm-infra.json: No such file or directory
Successfully refreshed your subscription
SERVICE ENTITLED STATUS DESCRIPTION
cc-eal yes n/a Common Criteria EAL2 Provisioning Packages
cis-audit no — Center for Internet Security Audit Tools
esm-infra yes disabled UA Infra: Extended Security Maintenance
fips yes n/a NIST-certified FIPS modules
fips-updates yes n/a Uncertified security updates to FIPS modules
livepatch yes n/a Canonical Livepatch service

Enable services with: ua enable <service>

     Account: <email address hidden>
Subscription: <email address hidden>

Revision history for this message
Bryce Harrington (bryce) wrote :

The second test seems to have hit a network issue of some sort:

++ openstack server show test-trusty -f json
++ jq -r .addresses
++ awk -F = '{print $NF}'
+ VM_IP=10.48.129.245
+ echo 'Wait for cloud-init to finish startup on trusty: 10.48.129.245'
Wait for cloud-init to finish startup on trusty: 10.48.129.245
+ RUNLEVEL=NOTSET
+ '[' 'N 2' = NOTSET ']'
+ echo -n .
.+ sleep 5
++ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR ubuntu@10.48.129.245 runlevel
ssh: connect to host 10.48.129.245 port 22: Connection timed out
+ RUNLEVEL=

Revision history for this message
Bryce Harrington (bryce) wrote :

Verified git ubuntu build and build-source work, also uploaded to a PPA - https://launchpad.net/~bryce/+archive/ubuntu/ubuntu-advantage-tools-review-mp375564/+packages

$ git ubuntu tag --upload
$ git push pkg upload/19.6_ubuntu14.04.4
$ dput ubuntu ../ubuntu-advantage-tools_19.6~ubuntu14.04.4_source.changes
Checking signature on .changes
gpg: ../ubuntu-advantage-tools_19.6~ubuntu14.04.4_source.changes: Valid signature from E603B2578FB8F0FB
Checking signature on .dsc
gpg: ../ubuntu-advantage-tools_19.6~ubuntu14.04.4.dsc: Valid signature from E603B2578FB8F0FB
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubuntu-advantage-tools_19.6~ubuntu14.04.4.dsc: done.
  Uploading ubuntu-advantage-tools_19.6~ubuntu14.04.4.tar.gz: done.
  Uploading ubuntu-advantage-tools_19.6~ubuntu14.04.4_source.changes: done.
Successfully uploaded packages.

(It looks like the reason test #2 is failing is due to something wrong in my local openstack configuration. Not really sure how to debug it, but hopefully others can verify the tests against proposed during the SRU verification process.)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index ad6d0b3..effe086 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,9 @@
6+ubuntu-advantage-tools (19.6~ubuntu14.04.4) trusty; urgency=medium
7+
8+ * d/postinst: only configure ESM on supported architectures (LP: #1851858)
9+
10+ -- Andreas Hasenack <andreas@canonical.com> Thu, 14 Nov 2019 14:34:50 -0300
11+
12 ubuntu-advantage-tools (19.6~ubuntu14.04.3) trusty; urgency=medium
13
14 * d/postinst: rename existing ubuntu-esm-precise.list file to trusty.
15diff --git a/debian/postinst b/debian/postinst
16index 95b35c8..c6fc6f9 100644
17--- a/debian/postinst
18+++ b/debian/postinst
19@@ -17,6 +17,8 @@ ESM_INFRA_APT_SOURCE_FILE_TRUSTY="$APT_SRC_DIR/ubuntu-esm-infra-trusty.list"
20 ESM_APT_PREF_FILE_TRUSTY="/etc/apt/preferences.d/ubuntu-esm-trusty"
21 ESM_INFRA_APT_PREF_FILE_TRUSTY="/etc/apt/preferences.d/ubuntu-esm-infra-trusty"
22
23+MYARCH="$(dpkg --print-architecture)"
24+ESM_SUPPORTED_ARCHS="i386 amd64"
25
26 unconfigure_esm() {
27 rm -f $APT_TRUSTED_KEY_DIR/ubuntu-esm*gpg # Remove previous esm keys
28@@ -78,8 +80,15 @@ case "$1" in
29 rm -rf /var/cache/ubuntu-advantage-tools
30
31 if [ "14.04" = "$VERSION_ID" ]; then
32- configure_esm
33+ if echo "$ESM_SUPPORTED_ARCHS" | grep -qw "$MYARCH"; then
34+ # 14.04 and supported arch
35+ configure_esm
36+ else
37+ # 14.04 and unsupported arch
38+ unconfigure_esm
39+ fi
40 else
41+ # not 14.04, regardless of arch
42 unconfigure_esm
43 fi
44 if [ ! -f /var/log/ubuntu-advantage.log ]; then

Subscribers

People subscribed via source and target branches

to status/vote changes: