ua refresh "Unexpected error(s) occurred"

Bug #1951954 reported by Albourne Software
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Hirsute
Fix Released
Undecided
Unassigned
Impish
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
If /snap/bin is not present in the PATH, UA will fail when trying to run it.
This is fixed by specifying the full path (/snap/bin/canonical-livepatch) to every call from UA side.

[Test Case]
To reproduce the bug, run `sudo env PATH="/usr/bin" ua refresh` on an attached bionic machine.

Then, install the 27.5 version from the staging PPA (https://launchpad.net/~ua-client/+archive/ubuntu/staging)

Repeating the same command as above runs without an error.

There is a test script attached to this bug, as well as execution output, to show the above solution works.

[Regression Potential]
It could only cause problems if canonical-livepatch is in a different place than /snap/bin, and it should not happen in any installation.

[Original Description]

root@somehost:~# ua refresh
Unexpected error(s) occurred.
For more details, see the log: /var/log/ubuntu-advantage.log
To file a bug run: ubuntu-bug ubuntu-advantage-tools

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: ubuntu-advantage-tools 27.4.1~18.04.1
ProcVersionSignature: Ubuntu 4.15.0-143.147-generic 4.15.18
Uname: Linux 4.15.0-143-generic x86_64
NonfreeKernelModules: lkp_Ubuntu_4_15_0_143_147_generic_82 lkp_Ubuntu_4_15_0_143_147_generic_81 lkp_Ubuntu_4_15_0_143_147_generic_80 lkp_Ubuntu_4_15_0_143_147_generic_79
ApportVersion: 2.20.9-0ubuntu7.27
Architecture: amd64
Date: Tue Nov 23 12:56:54 2021
InstallationDate: Installed on 2015-08-06 (2300 days ago)
InstallationMedia: Ubuntu-Server 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=screen
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-advantage-tools
UpgradeStatus: Upgraded to bionic on 2020-06-17 (524 days ago)

Revision history for this message
Albourne Software (asoftware) wrote :
Revision history for this message
Lucas Albuquerque Medeiros de Moura (lamoura) wrote :

Hi Albourne, can please run:

ua collect-logs

And append the result here so we can better investigate this issue

Changed in ubuntu-advantage-tools (Ubuntu):
status: New → Incomplete
Revision history for this message
Albourne Software (asoftware) wrote :
Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

Thank you Albourne for the additional information!

I was able to confirm this bug.

We are not specifying the full path to the `canonical-livepatch` executable every time we call it, so if it is not in your PATH you will get the error described here.

To reproduce the bug: `sudo env PATH="/usr/bin" ua refresh` on an attached bionic machine.

`canonical-livepatch` is located at `/snap/bin/canonical-livepatch`. So if `/snap/bin` is not in PATH then the command will fail. `/snap/bin` is in the PATH by default which is why we haven't noticed this yet.

Workaround:

Adding `/snap/bin` to your path should allow you to run the command until we get this fixed:

sudo env PATH="$PATH:/snap/bin" ua refresh

Changed in ubuntu-advantage-tools (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Medium
description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Albourne, or anyone else affected,

Accepted ubuntu-advantage-tools into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.5~21.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-impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-impish. 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 Impish):
status: New → Fix Committed
tags: added: verification-needed verification-needed-impish
Changed in ubuntu-advantage-tools (Ubuntu Hirsute):
status: New → Fix Committed
tags: added: verification-needed-hirsute
Revision history for this message
Robie Basak (racb) wrote :

Hello Albourne, or anyone else affected,

Accepted ubuntu-advantage-tools into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.5~21.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-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. 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: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Robie Basak (racb) wrote :

Hello Albourne, 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.5~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: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Robie Basak (racb) wrote :

Hello Albourne, 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.5~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: New → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Robie Basak (racb) wrote :

Hello Albourne, 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.5~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.5~22.04.1

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

  * d/control:
    - Update homepage URL
  * d/tools.postinst:
    - Refactor to use valid_services
  * d/tools.postrm:
    - Use a wildcard to remove ua related gpg files
  * New upstream release 27.5 (LP: #1956456)
    - aws: add support for the IPv6 metadata endpoint
    - cis: update URL for the documentation
    - cli:
      + add endpoint to simulate the status using a specific contract token
      + fix return code when attaching an already attached machine (GH: #1867)
      + fix security-status to consider all possible origins to show updates
      + include cloud build.info in the collect-logs tarball
      + only show services which exist in the contracts server in ua status
    - docs: fix typos and wrong/outdated information
    - livepatch: always use the full path in livepatch calls (LP: #1951954)
    - logs:
      + improve rules to redact sensitive information from all log files
      + redact sensitive information from older unredacted log files
      + log errors from external software execution, for debugging purposes
    - usg:
      + support the presentedAs affordance from the contract server, showing
        services in the CLI with the appropriate names
      + replace the CIS entitlement by USG on Focal and onwards

 -- Renan Rodrigo <email address hidden> Tue, 04 Jan 2022 17:30:26 -0300

Changed in ubuntu-advantage-tools (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :
description: updated
tags: added: verification-done verification-done-bionic verification-done-focal verification-done-hirsute verification-done-impish verification-done-xenial
removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-hirsute verification-needed-impish verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

A quick question about this one: looking at the test output from script execution, it looks like only the bionic packages have been tested, but the bug does not mention anything about other series not being affected. Does this mean this bug does not manifest itself on other series? Could someone confirm that with me?

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

Sorry for not putting the whole verification up here.

For the LTS releases, I am attaching all the output files from running the test script (and did a small change to the script, to make sure only u-a-t is upgraded from proposed).

This bug does not affect non-LTS releases because livepatch can't be enabled on those - current UA services will be n/a on hirsute/impish.

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.5~21.04.1

---------------
ubuntu-advantage-tools (27.5~21.04.1) hirsute; urgency=medium

  * Backport new upstream release: (LP: #1956456) to hirsute

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

  * d/control:
    - Update homepage URL
  * d/tools.postinst:
    - Refactor to use valid_services
  * d/tools.postrm:
    - Use a wildcard to remove ua related gpg files
  * New upstream release 27.5 (LP: #1956456)
    - aws: add support for the IPv6 metadata endpoint
    - cis: update URL for the documentation
    - cli:
      + add endpoint to simulate the status using a specific contract token
      + fix return code when attaching an already attached machine (GH: #1867)
      + fix security-status to consider all possible origins to show updates
      + include cloud build.info in the collect-logs tarball
      + only show services which exist in the contracts server in ua status
    - docs: fix typos and wrong/outdated information
    - livepatch: always use the full path in livepatch calls (LP: #1951954)
    - logs:
      + improve rules to redact sensitive information from all log files
      + redact sensitive information from older unredacted log files
      + log errors from external software execution, for debugging purposes
    - usg:
      + support the presentedAs affordance from the contract server, showing
        services in the CLI with the appropriate names
      + replace the CIS entitlement by USG on Focal and onwards

 -- Renan Rodrigo <email address hidden> Wed, 05 Jan 2022 10:01:09 -0300

Changed in ubuntu-advantage-tools (Ubuntu Hirsute):
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.5~20.04.1

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

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

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

  * d/control:
    - Update homepage URL
  * d/tools.postinst:
    - Refactor to use valid_services
  * d/tools.postrm:
    - Use a wildcard to remove ua related gpg files
  * New upstream release 27.5 (LP: #1956456)
    - aws: add support for the IPv6 metadata endpoint
    - cis: update URL for the documentation
    - cli:
      + add endpoint to simulate the status using a specific contract token
      + fix return code when attaching an already attached machine (GH: #1867)
      + fix security-status to consider all possible origins to show updates
      + include cloud build.info in the collect-logs tarball
      + only show services which exist in the contracts server in ua status
    - docs: fix typos and wrong/outdated information
    - livepatch: always use the full path in livepatch calls (LP: #1951954)
    - logs:
      + improve rules to redact sensitive information from all log files
      + redact sensitive information from older unredacted log files
      + log errors from external software execution, for debugging purposes
    - usg:
      + support the presentedAs affordance from the contract server, showing
        services in the CLI with the appropriate names
      + replace the CIS entitlement by USG on Focal and onwards

 -- Renan Rodrigo <email address hidden> Wed, 05 Jan 2022 10:01:05 -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.5~18.04.1

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

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

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

  * d/control:
    - Update homepage URL
  * d/tools.postinst:
    - Refactor to use valid_services
  * d/tools.postrm:
    - Use a wildcard to remove ua related gpg files
  * New upstream release 27.5 (LP: #1956456)
    - aws: add support for the IPv6 metadata endpoint
    - cis: update URL for the documentation
    - cli:
      + add endpoint to simulate the status using a specific contract token
      + fix return code when attaching an already attached machine (GH: #1867)
      + fix security-status to consider all possible origins to show updates
      + include cloud build.info in the collect-logs tarball
      + only show services which exist in the contracts server in ua status
    - docs: fix typos and wrong/outdated information
    - livepatch: always use the full path in livepatch calls (LP: #1951954)
    - logs:
      + improve rules to redact sensitive information from all log files
      + redact sensitive information from older unredacted log files
      + log errors from external software execution, for debugging purposes
    - usg:
      + support the presentedAs affordance from the contract server, showing
        services in the CLI with the appropriate names
      + replace the CIS entitlement by USG on Focal and onwards

 -- Renan Rodrigo <email address hidden> Wed, 05 Jan 2022 10:01:00 -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.5~16.04.1

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

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

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

  * d/control:
    - Update homepage URL
  * d/tools.postinst:
    - Refactor to use valid_services
  * d/tools.postrm:
    - Use a wildcard to remove ua related gpg files
  * New upstream release 27.5 (LP: #1956456)
    - aws: add support for the IPv6 metadata endpoint
    - cis: update URL for the documentation
    - cli:
      + add endpoint to simulate the status using a specific contract token
      + fix return code when attaching an already attached machine (GH: #1867)
      + fix security-status to consider all possible origins to show updates
      + include cloud build.info in the collect-logs tarball
      + only show services which exist in the contracts server in ua status
    - docs: fix typos and wrong/outdated information
    - livepatch: always use the full path in livepatch calls (LP: #1951954)
    - logs:
      + improve rules to redact sensitive information from all log files
      + redact sensitive information from older unredacted log files
      + log errors from external software execution, for debugging purposes
    - usg:
      + support the presentedAs affordance from the contract server, showing
        services in the CLI with the appropriate names
      + replace the CIS entitlement by USG on Focal and onwards

 -- Renan Rodrigo <email address hidden> Wed, 05 Jan 2022 10:00:54 -0300

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

---------------
ubuntu-advantage-tools (27.5~21.10.1) impish; urgency=medium

  * Backport new upstream release: (LP: #1956456) to impish

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

  * d/control:
    - Update homepage URL
  * d/tools.postinst:
    - Refactor to use valid_services
  * d/tools.postrm:
    - Use a wildcard to remove ua related gpg files
  * New upstream release 27.5 (LP: #1956456)
    - aws: add support for the IPv6 metadata endpoint
    - cis: update URL for the documentation
    - cli:
      + add endpoint to simulate the status using a specific contract token
      + fix return code when attaching an already attached machine (GH: #1867)
      + fix security-status to consider all possible origins to show updates
      + include cloud build.info in the collect-logs tarball
      + only show services which exist in the contracts server in ua status
    - docs: fix typos and wrong/outdated information
    - livepatch: always use the full path in livepatch calls (LP: #1951954)
    - logs:
      + improve rules to redact sensitive information from all log files
      + redact sensitive information from older unredacted log files
      + log errors from external software execution, for debugging purposes
    - usg:
      + support the presentedAs affordance from the contract server, showing
        services in the CLI with the appropriate names
      + replace the CIS entitlement by USG on Focal and onwards

 -- Renan Rodrigo <email address hidden> Wed, 05 Jan 2022 10:01:14 -0300

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