← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1951705] Re: traceback from postinst on upgrade

 

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

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

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

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

  * d/tools.postinst:
    - Fix check_service_is_enabled function when the machine is
      unattached (LP: #1951705)

 -- Lucas Moura <lucas.moura@xxxxxxxxxxxxx>  Tue, 23 Nov 2021 16:18:47
-0300

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

Title:
  traceback from postinst on upgrade

Status in ubuntu-advantage-tools package in Ubuntu:
  Fix Released
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:
  [Original bug description]
  I noticed this on an upgrade in focal:

  Setting up ubuntu-advantage-tools (27.4.1~20.04.1) ...
  Installing new version of config file /etc/ubuntu-advantage/uaclient.conf ...
  Traceback (most recent call last):
    File "<string>", line 10, in <module>
  KeyError: 'status'
  Traceback (most recent call last):
    File "<string>", line 10, in <module>
  KeyError: 'status'

  It's clearly nonfatal, but we shouldn't see python tracebacks in
  upgrade logs.

  [Impact]
  This releases will guarantee that unattached users installing ubuntu-advantage-tools in an architecture that is different from i386 and amd64
  will no longer see the KeyError issue. Additionally, this will guarantee that the postinst flow where this error is triggered will be finished. However, this should not impact users that saw this bug, since the function was cleaning up old apt sources for esm-infra and esm-apps. However, since the user is unattached, that cleanup should have already happened if those service were once enabled.

  [Test Case]

  1.Launch an ubuntu machine:
    $ lxc launch ubuntu-daily:xenial dev-x
  2. SSH into the machine and update ubuntu-advantage-tools to 27.4.1
  3. Run ua status
  4. Go into /var/lib/dpkg/info/ubuntu-advantage-tools.postinst and
     change the ESM_SUPPORTED_ARCHS variable to be empty
  5. Run dpkg-reconfigure ubuntu-advantage-tools
  6. Confirm that the expected error is there
  7. Install the new UA package 27.4.2
     https://launchpad.net/~ua-client/+archive/ubuntu/staging/
  8. Go into /var/lib/dpkg/info/ubuntu-advantage-tools.postinst and
     change the ESM_SUPPORTED_ARCHS variable to be empty
  9. Run the dpkg command again and verify that no errors are shown

  <TODO After released to -proposed: attach integration test artifacts>

  [Regression Potential]
  We currently don't see any regression potential, we are just making the code more resilient to potential errors on unattached scenarios.

  [racb] We're adjusting the postinst, so if something goes wrong, it's
  likely to manifest in the console at package install or upgrade time.

  [racb] Sometimes existing issues get exacerbated by issuing an update
  that causes the postinst to run again.

  [Discussion]
  Even though this will not affect all architecturse, we believe it is safer to address this as soon as possible, since we don't know when our next major release will be.

  [Changelog]

       * d/tools.postinst:
         - Fix check_service_is_enabled function when the machine is
           unattached (LP: #1951705)

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