[FFe] ubuntu-advantage-tools v.19

Bug #1814157 reported by Chad Smith on 2019-01-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)

Bug Description

The canonical-server team is requesting a feature freeze exception for acceptance of an new version of ubuntu-advantage-tools. Version 19 will introduce an updated command line interface (UA Client) to simplify some interaction with Ubuntu Advantage support offerings. This version of ubuntu-advantage-tools depends on interaction with a new remote Contract API service for authentication and entitlement details.

ubuntu-advantage-tools v.19 is currently under development against a Contract API spec but it has not yet been qualified against a functional (production, development) Contract API service. That contract service will not be made available to us until Feb 11th at earliest which doesn't leave enough time to validate ubuntu-advantage-tools' interaction with the remote API and resolve all major bugs by feature freeze date.

If we block the update to ubuntu-advantage-tools version 19, Ubuntu consumers will continue to use the existing ubuntu-advantage-tools. The current version requires authentication credentials for each different offering, whereas the new one offers a centralized and streamlined experience

 Our expectation is to have access to the UA Contract API backend service (ver.1) by Feb 11th at the earliest. The Contract API is under heavy active development which is changing the API spec in the process. When the Contract API service is available for testing, the Ubuntu Advantage integration testing against a functional API can begin to exercise both supported and unsupported platforms (kvm, lxc, baremetal). At this point any major bugs can be recognized and resolved.

Low-risk for Disco as ubuntu-advantage-tools will not allow enabling most support entitlements because it is not an LTS (where ESM or FIPS have support). This is a fairly simple command-line tool without a lot of moving pieces, the most significant complexity/risk in this new version comes from iteractions with the UA Contract API backend service to obtain auth tokens and request entitlement configuration details.

There is an apt hook for ESM being installed now that will run, and if it fails, it will print an error at the end of transactions:

<juliank|away> andreas: not near a computer (except my phone), and can't edit launchpad, but the only risk from the apt hook is it failing and printing error messages at the end of apt update/install/upgrade/etc

This new client is a rewrite from bash to python and is used only to enable/disable apt repositories, interact with motd and livepatch. The move to python makes it a bit easier to test functionality. We will have both integration tests and unittest coverage for all significant features to ensure that the features are well vetted prior to release.

Chad Smith (chad.smith) on 2019-01-31
description: updated
Łukasz Zemczak (sil2100) wrote :

There's still some hours until Feature Freeze, but so far the FFe looks sane. I would, in overall, recommend uploading the 19 version to the archive as soon as possible and use the time before release to work on all the rough edges. We'd of course like all devel uploads to be rock-solid, but there's also nothing wrong with uploading a base version of a rewritten app and then working (after FF) on making it shiny.

As for the FFe, you mention that the new version is a rewrite in python. What new dependencies would it introduce? Are all of them in main?

Chad Smith (chad.smith) wrote :

Thank Lukasz for the response here.

One of the dependencies that are introduced for the new UA client is a dependency on python3-pymacaroons which depends on python3-nacl and libsodium23. I will start filing MIRs for these packages packages tomorrow.

I will polish the current UA client so that the base version and get that uploaded as soon as possible.

Łukasz Zemczak (sil2100) wrote :

I might be missing something, but python3-pymacaroons seems to be in main for disco so no MIRs should be needed for it or its dependencies (since for it to be in main all it's deps need to be in main as well). So I think we're good from this POV.

Another question that pops in my mind: how does this change the actual install size of ubuntu-advantage-tools? I know this is probably an already set-in-stone design-decision, but since u-a-t is seeded in daily-live, it would be useful to know how much it will actually affect size.

Andreas Hasenack (ahasenack) wrote :

On a fresh disco container as of today:

root@disco-ua-size:~# dpkg -s ubuntu-advantage-tools |grep Installed-Size
Installed-Size: 85

root@disco-ua-size:~# apt-cache policy ubuntu-advantage-tools
  Installed: 18
  Candidate: 18
  Version table:
 *** 18 500
        500 http://br.archive.ubuntu.com/ubuntu disco/main amd64 Packages

purge + reinstall:
Need to get 18.5 kB of archives.
After this operation, 87.0 kB of additional disk space will be used.
Get:1 http://br.archive.ubuntu.com/ubuntu disco/main amd64 ubuntu-advantage-tools all 18 [18.5 kB]
root@disco-ua-size:~# du -hs /usr/share/ubuntu-advantage-tools/
63K /usr/share/ubuntu-advantage-tools/

After adding the ubuntu-advantage-tools daily ppa and requesting to install the new client:
The following additional packages will be installed:
  libsodium23 python3-nacl python3-pymacaroons
Suggested packages:
The following NEW packages will be installed:
  libsodium23 python3-nacl python3-pymacaroons
The following packages will be upgraded:
1 upgraded, 3 newly installed, 0 to remove and 22 not upgraded.
Need to get 247 kB of archives.
After this operation, 918 kB of additional disk space will be used.

root@disco-ua-size:~# du -hs /usr/lib/python3/dist-packages/uaclient
250K /usr/lib/python3/dist-packages/uaclient

root@disco-ua-size:~# dpkg -s ubuntu-advantage-tools |grep Installed-Size
Installed-Size: 177

And it is still a reverse dependency of ubuntu-minimal
root@disco-ua-size:~# dpkg -s ubuntu-minimal|grep Depends
Depends: adduser, apt, apt-utils, bzip2, console-setup, debconf, debconf-i18n, e2fsprogs, eject, init, initramfs-tools, iproute2, iputils-ping, isc-dhcp-client, kbd, kmod, less, locales, lsb-release, mawk, mount, netbase, netcat-openbsd, netplan.io, passwd, procps, python3, sensible-utils, sudo, tzdata, ubuntu-advantage-tools, ubuntu-keyring, udev, vim-tiny, whiptail

root@disco-ua-size:~# dpkg -s ubuntu-advantage-tools |grep Depends
Depends: python3-pymacaroons, python3-yaml, python3:any, libapt-pkg5.0 (>= 0.8.0), libc6 (>= 2.14), libgcc1 (>= 1:3.0), libstdc++6 (>= 5.2), python3-pkg-resources

description: updated
Steve Langasek (vorlon) wrote :

This is a client that needs to talk to the service as provided by Canonical. It has been in development for a while, and although it has missed Feature Freeze, we also expect it to be fully SRUed back to all stable series, so some latitude is justified. Also, the majority of services this client interacts with are only relevant on LTS releases, which 19.04 is not, so this is more about compliance with the SRU policy than it is about landing features in disco per se.

FFe granted.

Changed in ubuntu-advantage-tools (Ubuntu):
status: New → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 19.2

ubuntu-advantage-tools (19.2) disco; urgency=medium

  * Ubuntu Advantage Tools rewrite in Python (LP: #1814157):
    - Allow attaching a system to a contract or account
    - More complete status output, dropping MOTD updates
    - Easily enable and disable services offered

 -- Andreas Hasenack <email address hidden> Mon, 08 Apr 2019 16:55:12 -0300

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

Other bug subscribers