← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1940131] Re: sudo ua attach is not working

 

This bug was fixed in the package ubuntu-advantage-tools - 27.3~21.04.1

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

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

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

  * d/tools.postinst:
    - consider cloud to be "none" on any cloud-id error
    - purge old ua-messaging.timer/service files
    - keep ua-timer.timer disabled if ua-messaging.timer was disabled by
      the user
    - properly configure both ubuntu-advantage-timer and
      ubuntu-advantage-licence-check logs
  * d/tools.postrm:
    - remove ubuntu-advantage-timer and ubuntu-advantage-license-check logs
      during purge
  * systemd:
    - remove ua-messaging.timer/service
    - add new ua-timer.timer that runs every 6 hours
    - add new ua-license_check.timer that runs every 5 minutes only if
      activated by ua-license-check.path
  * New upstream release 27.3 (LP: #1942929)
    - ros:
      + add beta support to enable ros and ros-updates
      + add support for "required services" so that esm-infra and esm-apps
        get auto-enabled when enabling ros or ros-updates
      + add support for "dependent services" so that user gets prompted to
        disable ros/ros-updates if they disable esm-infra/esm-apps
    - fips:
      + allow fips on GCP bionic now that optimized kernel is ready
      + disallow enabling fips on focal on clouds until cloud-optimized focal
        fips-certified kernel is ready (LP: #1939449, LP: #1939932)
      + print warning about generic fips kernel if cloud-id fails
    - cloud:
      + rely only on cloud-id to determine cloud type (LP: #1940131)
      + catch errors when determining cloud type
        (LP: #1938207, LP: #1944676) (GH: #1541)
    - azure:
      + bump IMDS API version to support Azure published images
    - cli:
      + collect-logs command that creates a tar file with debug-relevant logs
        and status info (GH: #463)
      + clean locks on exceptions more thoroughly to avoid false "Operation in
        progress" status messages
      + retain past service state after detach
      + shows better error message when a port value in a proxy is invalid
    - non-unicode locale support:
      + remove unicode-only characters from help file
      + don't print unicode-only characters in ua fix if non-utf8 locale
        (GH: #1463)
    - logrotate:
      + add logrotate functionality for ubuntu-advantage-timer.log.
      + Fix root:root logrotate permissions.
    - ua-timer.timer:
      + introduce a single systemd timer to handle ua recurring jobs
      + timer runs every 2 hours to support most frequent timer job
      + recurring job intervals are configurable in uaclient.conf
      + individual jobs are disabled if their interval is set to 0
      - status job:
        + update ua status every 12 hours
      - messaging job:
        + update APT/MOTD ESM messaging every 6 hours
      - metering job:
        + disabled until infrastructure is ready
        + for attached machines only, periodically update contract server with
          status information for proper contract metering
    - ua-license-check.timer:
      + only runs on LTS GCP instances that are not attached
      + runs every 5 minutes to check if gcp instance has license required to
        auto-attach
    - logs:
      + fixes duplicate logging (GH: #553)
    - tests and support:
      + remove groovy integration tests
      + various improvements to integration tests

 -- Grant Orndorff <grant.orndorff@xxxxxxxxxxxxx>  Thu, 23 Sep 2021
16:42:08 -0400

** Changed in: ubuntu-advantage-tools (Ubuntu Hirsute)
       Status: Fix Committed => Fix Released

** Changed in: ubuntu-advantage-tools (Ubuntu Focal)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1940131

Title:
  sudo ua attach is not working

Status in ubuntu-advantage-tools package in Ubuntu:
  Fix Committed
Status in ubuntu-advantage-tools source package in Xenial:
  Fix Released
Status in ubuntu-advantage-tools source package in Bionic:
  Fix Released
Status in ubuntu-advantage-tools source package in Focal:
  Fix Released
Status in ubuntu-advantage-tools source package in Hirsute:
  Fix Released
Status in ubuntu-advantage-tools source package in Impish:
  Fix Released

Bug description:
  [Impact]
  This bug impacts users which:
  - Do not have the '/usr/bin/cloud-id' command in their system,
  - Do have the '/var/lib/cloud/data/result.json' file in their system, and
  - Have a non-standard (by cloud-init definitions) content in the '/var/lib/cloud/data/result.json' file.

  This is an unusual situation, given that the presence of the
  'result.json' file with the absence of the 'cloud-id' command is
  observed on official Trusty images, but from Xenial onwards 'cloud-id'
  should be there. Even in the case where the command is not there, the
  file generated by cloud-init will have the required information.

  Since we are doing the SRU process for Xenial onwards, the solution for those problems is to rely only on cloud-id when trying to determine the cloud type, and assuming not on cloud when the command is not present or if it fails.
  https://github.com/canonical/ubuntu-advantage-client/commit/f6fbcee792cf42cc67e3ced02815b7d552dee19f

  [Test Case]
  To reproduce:
  With ubuntu-advantage-tools 27.2 installed, in an Ubuntu machine:
  - Make sure cloud-id is not there:
    $ sudo mv /usr/bin/cloud-id /usr/bin/cloud-id.old
  - Make sure to have the result.json file with non-standard (empty, for instance) content:
    $ sudo mv /var/lib/cloud/data/result.json /var/lib/cloud/data/result.json.old (if the file exists)
    $ sudo touch /var/lib/cloud/data/result.json
  - Try to attach a token using "ua attach"
  - Verify that it fails

  To verify the fix:
  Repeat the above process using ubuntu-advantage tools 27.3, and verify that the attach operation succeeds.

  [Regression Potential]
  When running on a non-cloud system, this fix brings no impact, as we expect cloud-id to be absent and we are not running on cloud.

  When running on a specific cloud, this fix brings the scenario where
  we should detect the cloud and are unable to, due to problems with
  cloud-init. This is minor though, given that if cloud-init didn't run
  properly, the instance has more problems than this one. Besides that,
  considering no-cloud when not in aws/azure/gcp has no impact on UA at
  all, and those three providers have images with cloud-id working
  properly.

  No official Ubuntu image should be affected by this change.

  [Discussion]
  As stated above, this is an unusual situation, which led to an improvement to the cloud detection in UA.

  [Original Description]
  sudo ua status
  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.2.2~18.04.1
  ProcVersionSignature: Ubuntu 4.15.0-153.160-generic 4.15.18
  Uname: Linux 4.15.0-153-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.24
  Architecture: amd64
  Date: Mon Aug 16 19:14:53 2021
  InstallationDate: Installed on 2019-08-12 (735 days ago)
  InstallationMedia:

  SourcePackage: ubuntu-advantage-tools
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1940131/+subscriptions