[SRU] ubuntu-advantage-tools (27.11.3 -> 27.12) Xenial, Bionic, Focal, Jammy, Kinetic

Bug #1996424 reported by Lucas Albuquerque Medeiros de Moura
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

This release mostly include new features for the pro client. They are:

* Add functionality to show if the system requires a reboot or not. This functionality can be accessed through our API or the CLI.
* Add api support for some security-status information:
  - package summary information
  - list of available package updates
  - livepatch cves information
* Add api entry point to show packages installed in the machine as a manifest file
* Add retry mechanism for auto-attach on Pro cloud instances

Additionally, we are performing some refactorings in the code as well, for example:

* Remove package override logic when enabling FIPS services. Now we are relying exclusively on what the Contract server tell us when we install the FIPS metapackage.
* Use the auto_attach api on the CLI

[Test Case]

The following development and SRU process will be followed: https://wiki.ubuntu.com/UbuntuAdvantageToolsUpdates

The ubuntu-advantage-tools team will be in charge of attaching the artifacts and console output of the appropriate run to the bug. ubuntu-advantage-tools team members will not mark ‘verification-done’ until this has happened.

[Regression Potential]

There are 3 main concerns that we have regarding this release. They are:

* Installing incorrect FIPS metapackages:

Now that we are only relying on the Contract Server to tell us which FIPS metapackage to install in the system, we can install incorrect metapackages if the Contract Server deliver us wrong information.

* Change return code for auto-attach CLI commands

Previously, in the case where the user tried to auto attach using the cli `pro auto-attach` on instances that were already attached or have disable_auto_attach configured as true in the uaclient.conf file, the cli exited with a 0 exit_code. We are changing those return code and that can harm users that are relying on a non-error execution under those conditions.

* Adding another service to the daemon

To make the retry auto-attach service works, we added a new service to our existing daemon. This service should only run for Pro instances if auto-attach fails. However, due to the already existing GCP service we have for GCP Pro instances, there could be unknown interactions between them, which could make unexpected changes on the machine.

However, we believe all of those 3 regression potentials are low risk, as we will discuss in the next section.

[Discussion]

We want to address all of the regression potentials that we have:

* Installing incorrect FIPS metapackages:

We already have integration tests for all the clouds we support FIPS on. We were not able to detect any case where we installed the incorrect metapackage on those instance. Because of our tests, we believe that this a low risk regression.

* Change return code for auto-attach CLI commands

The cli returned 0s for on those two scenarios (auto-attach disabled on config and machine already attached) because we would call the cli command on the ua-auto-attach.service systemd unit. If we detected that the user was already attached or had an explicit config disabling that service, we didn't want to show that this service failed. However, we have a dedicated script for that systemd unit now that properly handle those error situations, which will make the systemd unit to not fail if that happens.

Additionally, we didn't advertise the use of `pro auto-attach` for programmatic consumption.

Therefore we believe it is safe to change the exit codes for those scenarios

* Adding another service to the daemon

We have created a flow diagram for the new retry auto-attach service:
https://github.com/canonical/ubuntu-advantage-client/blob/main/dev-docs/explanations/systemd_units.md

We have tested our code and it correctly follows that diagram. As we can see, the main interaction scenarios between the two services (auto-attach and GCP polling service) are covered in the code.

Additionally, we already discussed the potential scenarios on the US011 spec with other teams.

Because of all that, even though unknown interactions are still possible, we believe the regression potential is low here.

Similar points were made during the review of this upload to Lunar in the MP that are worth checking out:

https://code.launchpad.net/~lamoura/ubuntu/+source/ubuntu-advantage-tools/+git/ubuntu-advantage-tools/+merge/432980

[Changelog]

    - auto-attach:
      + use auto-attach api in cli entry-point
      + retry auto-attach for up to one month on Ubuntu Pro cloud instances
      + best_effort auto_attach api instead of fail fast
    - enable: show deduplicated list of supported arches (GH: #917)
    - fips: remove cloud package override logic
    - messaging: verify contract expiration date on contract server before
      outputting expired message on MOTD
    - realtime-kernel: make service non-beta
    - reboot-required:
      + add api support to show if the system requires a reboot
      + add cli command for the functionality
    - security-status:
      + add api support to report standard updates
      + add api support to show livepatch cves
      + add api support to show packages summary information
      + list packages in oci manifest format
    - systemd: add machine token condition for auto-attac

Related branches

summary: - [SRU] ubuntu-advantage-tools (27.11.3 -> 27.11.4) Xenial, Bionic,
- Focal, Jammy
+ [SRU] ubuntu-advantage-tools (27.11.3 -> 27.12) Xenial, Bionic, Focal,
+ Jammy, Kinetic
description: updated
description: updated
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Lunar was uploaded on the 21st and is going through migration at the moment:
Uploading ubuntu-advantage-tools_27.12~23.04.1.dsc
Uploading ubuntu-advantage-tools_27.12~23.04.1.tar.xz
Uploading ubuntu-advantage-tools_27.12~23.04.1_source.buildinfo
Uploading ubuntu-advantage-tools_27.12~23.04.1_source.changes

Kinetic uploaded now:
Uploading ubuntu-advantage-tools_27.12~22.10.1.dsc
Uploading ubuntu-advantage-tools_27.12~22.10.1.tar.xz
Uploading ubuntu-advantage-tools_27.12~22.10.1_source.buildinfo
Uploading ubuntu-advantage-tools_27.12~22.10.1_source.changes

Jammy uploaded now:
Uploading ubuntu-advantage-tools_27.12~22.04.1.dsc
Uploading ubuntu-advantage-tools_27.12~22.04.1.tar.xz
Uploading ubuntu-advantage-tools_27.12~22.04.1_source.buildinfo
Uploading ubuntu-advantage-tools_27.12~22.04.1_source.changes

Focal uploaded now:
Uploading ubuntu-advantage-tools_27.12~20.04.1.dsc
Uploading ubuntu-advantage-tools_27.12~20.04.1.tar.xz
Uploading ubuntu-advantage-tools_27.12~20.04.1_source.buildinfo
Uploading ubuntu-advantage-tools_27.12~20.04.1_source.changes

Bionic uploaded now:
Uploading ubuntu-advantage-tools_27.12~18.04.1.dsc
Uploading ubuntu-advantage-tools_27.12~18.04.1.tar.xz
Uploading ubuntu-advantage-tools_27.12~18.04.1_source.buildinfo
Uploading ubuntu-advantage-tools_27.12~18.04.1_source.changes

Xenial uploaded now:
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubuntu-advantage-tools_27.12~16.04.1.dsc: done.
  Uploading ubuntu-advantage-tools_27.12~16.04.1.tar.xz: done.
  Uploading ubuntu-advantage-tools_27.12~16.04.1_source.buildinfo: done.
  Uploading ubuntu-advantage-tools_27.12~16.04.1_source.changes: done.
Successfully uploaded packages.

Changed in ubuntu-advantage-tools (Ubuntu):
status: New → In Progress
Changed in ubuntu-advantage-tools (Ubuntu Xenial):
status: New → In Progress
Changed in ubuntu-advantage-tools (Ubuntu Bionic):
status: New → In Progress
Changed in ubuntu-advantage-tools (Ubuntu Focal):
status: New → In Progress
Changed in ubuntu-advantage-tools (Ubuntu Jammy):
status: New → In Progress
Changed in ubuntu-advantage-tools (Ubuntu Kinetic):
status: New → In Progress
Changed in ubuntu-advantage-tools (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Lucas, or anyone else affected,

Accepted ubuntu-advantage-tools into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.12~22.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-advantage-tools (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in ubuntu-advantage-tools (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Lucas, or anyone else affected,

Accepted ubuntu-advantage-tools into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.12~22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-advantage-tools (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Lucas, or anyone else affected,

Accepted ubuntu-advantage-tools into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.12~20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-advantage-tools (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Lucas, or anyone else affected,

Accepted ubuntu-advantage-tools into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.12~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-advantage-tools (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Lucas, or anyone else affected,

Accepted ubuntu-advantage-tools into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.12~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.12~23.04.1

---------------
ubuntu-advantage-tools (27.12~23.04.1) lunar; urgency=medium

  * New upstream release 27.12 (LP: #1996424):
    - auto-attach:
      + retry auto-attach for up to one month on Ubuntu Pro cloud instances
      + make a best effort to auto-attach when using the API
    - enable: show deduplicated list of supported arches (GH: #917)
    - fips: remove cloud package override logic from the client
    - messaging: verify contract expiration date on contract server before
      outputting expired message on MOTD
    - realtime-kernel: make service non-beta
    - reboot-required:
      + add API support to show if the system requires a reboot
        (u.pro.security.status.reboot_required.v1)
      + add cli command for the functionality (pro system reboot-required)
    - security-status:
      + add API support to report standard updates (u.pro.packages.updates.v1)
      + add API support to show CVEs patched by Livepatch
        (u.pro.security.status.livepatch_cves.v1)
      + add API support to show packages summary information
        (u.pro.packages.summary.v1)
      + list packages in oci manifest format (u.security.package_manifest.v1)
    - systemd: do not attempt to auto-attach if a machine-token is present

 -- Lucas Moura <email address hidden> Fri, 11 Nov 2022 14:27:00 -0300

Changed in ubuntu-advantage-tools (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Lucas Albuquerque Medeiros de Moura (lamoura) wrote :

We have run the full ubuntu-advantage-tools integration test suite against the version in -proposed. The results are attached. All tests passed.

You can verify the correct version was used by checking the output of the first test in each file, which prints the version number.

I am marking the verification done for this SRU.

tags: added: verification-done verification-done-bionic verification-done-focal verification-done-jammy verification-done-kinetic verification-done-xenial
removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.12~22.10.1

---------------
ubuntu-advantage-tools (27.12~22.10.1) kinetic; urgency=medium

  * Backport new upstream release: (LP: #1996424) to kinetic

ubuntu-advantage-tools (27.12~23.04.1) lunar; urgency=medium

  * New upstream release 27.12 (LP: #1996424):
    - auto-attach:
      + retry auto-attach for up to one month on Ubuntu Pro cloud instances
      + make a best effort to auto-attach when using the API
    - enable: show deduplicated list of supported arches (GH: #917)
    - fips: remove cloud package override logic from the client
    - messaging: verify contract expiration date on contract server before
      outputting expired message on MOTD
    - realtime-kernel: make service non-beta
    - reboot-required:
      + add API support to show if the system requires a reboot
        (u.pro.security.status.reboot_required.v1)
      + add cli command for the functionality (pro system reboot-required)
    - security-status:
      + add API support to report standard updates (u.pro.packages.updates.v1)
      + add API support to show CVEs patched by Livepatch
        (u.pro.security.status.livepatch_cves.v1)
      + add API support to show packages summary information
        (u.pro.packages.summary.v1)
      + list packages in oci manifest format (u.security.package_manifest.v1)
    - systemd: do not attempt to auto-attach if a machine-token is present

 -- Lucas Moura <email address hidden> Tue, 22 Nov 2022 10:06:35 -0300

Changed in ubuntu-advantage-tools (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubuntu-advantage-tools has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.12~22.04.1

---------------
ubuntu-advantage-tools (27.12~22.04.1) jammy; urgency=medium

  * Backport new upstream release: (LP: #1996424) to jammy

ubuntu-advantage-tools (27.12~23.04.1) lunar; urgency=medium

  * New upstream release 27.12 (LP: #1996424):
    - auto-attach:
      + retry auto-attach for up to one month on Ubuntu Pro cloud instances
      + make a best effort to auto-attach when using the API
    - enable: show deduplicated list of supported arches (GH: #917)
    - fips: remove cloud package override logic from the client
    - messaging: verify contract expiration date on contract server before
      outputting expired message on MOTD
    - realtime-kernel: make service non-beta
    - reboot-required:
      + add API support to show if the system requires a reboot
        (u.pro.security.status.reboot_required.v1)
      + add cli command for the functionality (pro system reboot-required)
    - security-status:
      + add API support to report standard updates (u.pro.packages.updates.v1)
      + add API support to show CVEs patched by Livepatch
        (u.pro.security.status.livepatch_cves.v1)
      + add API support to show packages summary information
        (u.pro.packages.summary.v1)
      + list packages in oci manifest format (u.security.package_manifest.v1)
    - systemd: do not attempt to auto-attach if a machine-token is present

 -- Lucas Moura <email address hidden> Tue, 22 Nov 2022 10:06:26 -0300

Changed in ubuntu-advantage-tools (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.12~20.04.1

---------------
ubuntu-advantage-tools (27.12~20.04.1) focal; urgency=medium

  * Backport new upstream release: (LP: #1996424) to focal

ubuntu-advantage-tools (27.12~23.04.1) lunar; urgency=medium

  * New upstream release 27.12 (LP: #1996424):
    - auto-attach:
      + retry auto-attach for up to one month on Ubuntu Pro cloud instances
      + make a best effort to auto-attach when using the API
    - enable: show deduplicated list of supported arches (GH: #917)
    - fips: remove cloud package override logic from the client
    - messaging: verify contract expiration date on contract server before
      outputting expired message on MOTD
    - realtime-kernel: make service non-beta
    - reboot-required:
      + add API support to show if the system requires a reboot
        (u.pro.security.status.reboot_required.v1)
      + add cli command for the functionality (pro system reboot-required)
    - security-status:
      + add API support to report standard updates (u.pro.packages.updates.v1)
      + add API support to show CVEs patched by Livepatch
        (u.pro.security.status.livepatch_cves.v1)
      + add API support to show packages summary information
        (u.pro.packages.summary.v1)
      + list packages in oci manifest format (u.security.package_manifest.v1)
    - systemd: do not attempt to auto-attach if a machine-token is present

 -- Lucas Moura <email address hidden> Tue, 22 Nov 2022 10:06:19 -0300

Changed in ubuntu-advantage-tools (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.12~18.04.1

---------------
ubuntu-advantage-tools (27.12~18.04.1) bionic; urgency=medium

  * Backport new upstream release: (LP: #1996424) to bionic

ubuntu-advantage-tools (27.12~23.04.1) lunar; urgency=medium

  * New upstream release 27.12 (LP: #1996424):
    - auto-attach:
      + retry auto-attach for up to one month on Ubuntu Pro cloud instances
      + make a best effort to auto-attach when using the API
    - enable: show deduplicated list of supported arches (GH: #917)
    - fips: remove cloud package override logic from the client
    - messaging: verify contract expiration date on contract server before
      outputting expired message on MOTD
    - realtime-kernel: make service non-beta
    - reboot-required:
      + add API support to show if the system requires a reboot
        (u.pro.security.status.reboot_required.v1)
      + add cli command for the functionality (pro system reboot-required)
    - security-status:
      + add API support to report standard updates (u.pro.packages.updates.v1)
      + add API support to show CVEs patched by Livepatch
        (u.pro.security.status.livepatch_cves.v1)
      + add API support to show packages summary information
        (u.pro.packages.summary.v1)
      + list packages in oci manifest format (u.security.package_manifest.v1)
    - systemd: do not attempt to auto-attach if a machine-token is present

 -- Lucas Moura <email address hidden> Tue, 22 Nov 2022 10:06:13 -0300

Changed in ubuntu-advantage-tools (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.12~16.04.1

---------------
ubuntu-advantage-tools (27.12~16.04.1) xenial; urgency=medium

  * Backport new upstream release: (LP: #1996424) to xenial

ubuntu-advantage-tools (27.12~23.04.1) lunar; urgency=medium

  * New upstream release 27.12 (LP: #1996424):
    - auto-attach:
      + retry auto-attach for up to one month on Ubuntu Pro cloud instances
      + make a best effort to auto-attach when using the API
    - enable: show deduplicated list of supported arches (GH: #917)
    - fips: remove cloud package override logic from the client
    - messaging: verify contract expiration date on contract server before
      outputting expired message on MOTD
    - realtime-kernel: make service non-beta
    - reboot-required:
      + add API support to show if the system requires a reboot
        (u.pro.security.status.reboot_required.v1)
      + add cli command for the functionality (pro system reboot-required)
    - security-status:
      + add API support to report standard updates (u.pro.packages.updates.v1)
      + add API support to show CVEs patched by Livepatch
        (u.pro.security.status.livepatch_cves.v1)
      + add API support to show packages summary information
        (u.pro.packages.summary.v1)
      + list packages in oci manifest format (u.security.package_manifest.v1)
    - systemd: do not attempt to auto-attach if a machine-token is present

 -- Lucas Moura <email address hidden> Tue, 22 Nov 2022 10:06:06 -0300

Changed in ubuntu-advantage-tools (Ubuntu Xenial):
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.