Hello Steve, 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.4.2~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.

** Description changed:

  [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
+   $ 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
+    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/
+    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
+    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 install or upgrade time.
+ 
  [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)
+      * d/tools.postinst:
+        - Fix check_service_is_enabled function when the machine is
+          unattached (LP: #1951705)

** Description changed:

  [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 install or upgrade time.
+ 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)

** Summary changed:

- ubuntu-advantage-tools (27.4.1 -> 27.4.2) Xenial, Bionic, Focal, Hirsute, 
Impish
+ traceback from postinst on upgrade

** 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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1951705

Title:
  traceback from postinst on upgrade

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


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to