New upstream release: 20.3 for focal

Bug #1869980 reported by Chad Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Fix Released
High
Bryce Harrington

Bug Description

Business justification:

  There is an additional bug-fix in 20.3.0 which is not included in 20.2.1~0ubuntu1 that allows Ubuntu PRO images to re-attach when cloud-platform's instance-id changes due to a cloned VM.

LP: #1867573

A New upstream snapshot is performed to avoid bloated debdiffs from a previous release.

Testing:
   I have dput the contents of this upload to my private PPA: https://launchpad.net/~chad.smith/+archive/ubuntu/ua-client-premium-demo

  To install and test on focal:

    lxc launch ubuntu-daily:focal test-ua-tools
    lxc exec test-ua-tools -- sudo add-apt-repository ppa:chad.smith/test-release-ua-tools
    lxc exec test-ua-tools -- sudo apt-get update
    lxc exec test-ua-tools -- sudo apt-get install ubuntu-advantage-tools=20.3

# Obtain your UA Token from https://auth.contracts.canonical.com

# Attach the container to UA
    lxc exec test-ua-tools -- sudo ua attach <YOUR_TOKEN>
    sudo ua status to ensure the container attached without error

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

Test procedure worked:

stirling:~$ lxc exec test-ua-tools -- sudo ua attach xxxx
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
Enabling default service esm-infra
Updating package lists
ESM Infra enabled
This machine is now attached to '<email address hidden>'

SERVICE ENTITLED STATUS DESCRIPTION
cc-eal yes n/a Common Criteria EAL2 Provisioning Packages
cis-audit no — Center for Internet Security Audit Tools
esm-apps no — UA Apps: Extended Security Maintenance
esm-infra yes enabled 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>
stirling:~$ sudo ua status
[sudo] password for bryce:
SERVICE AVAILABLE DESCRIPTION
cc-eal no Common Criteria EAL2 Provisioning Packages
esm-apps yes UA Apps: Extended Security Maintenance
esm-infra yes UA Infra: Extended Security Maintenance
fips no NIST-certified FIPS modules
fips-updates no Uncertified security updates to FIPS modules
livepatch yes Canonical Livepatch service

This machine is not attached to a UA subscription.
See https://ubuntu.com/advantage

Chad Smith (chad.smith)
Changed in ubuntu-advantage-tools (Ubuntu):
assignee: nobody → Bryce Harrington (bryce)
description: updated
Bryce Harrington (bryce)
Changed in ubuntu-advantage-tools (Ubuntu):
status: New → In Progress
importance: Undecided → High
Revision history for this message
Bryce Harrington (bryce) wrote :
Download full text (4.3 KiB)

Re-testing against the updated PPA version, rebuilt locally:

0. √ Source package unpacked ok
1. √ Build worked ok
2. √ The .deb file manual installation worked ok
3. √ Downgrading the package works ok
4. ! tox hit an ERROR
5. √ autopkgtest passed ok
6. √ Review of changes vs. prior release

== Details ==

0. Source package unpacked ok

No stray changes, files appear to match git tree

1. Build worked ok.

All build tests passed 100%
debuild shows a few warnings and errors:

Now running lintian ubuntu-advantage-tools_20.3_amd64.changes ...
E: ubuntu-advantage-tools: no-debconf-config
E: ubuntu-advantage-tools source: not-using-po-debconf
E: ubuntu-advantage-tools source: untranslatable-debconf-templates ubuntu-advantage-tools.templates: 3
W: ubuntu-advantage-tools source: build-depends-on-obsolete-package build-depends: dh-systemd => use debhelper (>= 9.20160709)
W: ubuntu-advantage-tools source: debhelper-but-no-misc-depends ubuntu-advantage-pro
W: ubuntu-advantage-tools: postinst-uses-db-input
W: ubuntu-advantage-tools: uses-dpkg-database-directly usr/lib/python3/dist-packages/uaclient/apt.py

I think these can probably be ignored for 20.3 but you might look into them for future releases.

2. The .deb file manual installation worked ok

$ sudo dpkg -i ubuntu-advantage-tools_20.3_amd64.deb
(Reading database ... 60450 files and directories currently installed.)
Preparing to unpack ubuntu-advantage-tools_20.3_amd64.deb ...
Unpacking ubuntu-advantage-tools (20.3) over (20.2.1~0ubuntu1) ...
Setting up ubuntu-advantage-tools (20.3) ...
/usr/lib/python3.8/subprocess.py:838: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdin = io.open(p2cwrite, 'wb', bufsize)
Processing triggers for man-db (2.9.1-1) ...

(That warning is unrelated to ua-tools, it is something in focal that seems to come up for all python packages.)

3. Downgrading the package works ok:

$ sudo apt-get install ubuntu-advantage-tools=20.2.1~0ubuntu1
...
Unpacking ubuntu-advantage-tools (20.2.1~0ubuntu1) over (20.3) ...
Setting up ubuntu-advantage-tools (20.2.1~0ubuntu1) ...
/usr/lib/python3.8/subprocess.py:838: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdin = io.open(p2cwrite, 'wb', bufsize)
Processing triggers for man-db (2.9.1-1) ...

4. tox had some flake8 errors

$ tox
...
  File "/home/bryce/ubuntu/UATools/ubuntu-advantage-tools-20.3/.tox/flake8-xenial/lib/python3.8/site-packages/pyflakes/checker.py", line 462, in getNodeHandler
    self._nodeHandlers[node_class] = handler = getattr(self, nodeType)
AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'
ERROR: InvocationError for command /home/bryce/ubuntu/UATools/ubuntu-advantage-tools-20.3/.tox/flake8-xenial/bin/flake8 uaclient setup.py (exited with code 1)
...
All done! ✨ 🍰 ✨
63 files would be left unchanged.
______________________________________________________ summary ______________________________________________________
  py3: commands succeeded
  flake8: commands succeeded
  py3-xenial: commands succeeded
  py3-bionic: commands succeeded
  py3-e...

Read more...

Revision history for this message
Chad Smith (chad.smith) wrote :

Thanks for the testing Bryce, That pyflakes error is due to running xenial/bionic tests on Focal using the packaged versions of pyflakes in Xenial and Bionic which doesn't support python 3.8.

This also hit cloud-init too in that we need to pin a version of pyflakes that support python 3.8 if running flake8 xenial or bionic tests in a focal python3 environment.

I've filed an upstream bug for this, but it shouldn't impact this upload as we run this testing in Travis CI on proper version of python in each release xenial and bionic which is why this doesn't error there.

Upstream Issue to track and fix tox.ini for developer testing of xenial/bionic environments from focal.

https://github.com/CanonicalLtd/ubuntu-advantage-client/issues/1023

Revision history for this message
Chad Smith (chad.smith) wrote :

Also added a lintian issue against this package as well for future work
https://github.com/CanonicalLtd/ubuntu-advantage-client/issues/1024

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

Package uploaded:

$ dput ubuntu ubuntu-advantage-tools_20.3_source.changes
Checking signature on .changes
gpg: /home/bryce/ubuntu/UATools/ubuntu-advantage-tools_20.3_source.changes: Valid signature from E603B2578FB8F0FB
Checking signature on .dsc
gpg: /home/bryce/ubuntu/UATools/ubuntu-advantage-tools_20.3.dsc: Valid signature from E603B2578FB8F0FB
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubuntu-advantage-tools_20.3.dsc: done.
  Uploading ubuntu-advantage-tools_20.3.tar.xz: done.
  Uploading ubuntu-advantage-tools_20.3_source.buildinfo: done.
  Uploading ubuntu-advantage-tools_20.3_source.changes: done.
Successfully uploaded packages.

Changed in ubuntu-advantage-tools (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

This is in focal now.

Changed in ubuntu-advantage-tools (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.