** 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>
+   File "<string>", line 10, in <module>
  KeyError: 'status'
  Traceback (most recent call last):
-   File "<string>", line 10, in <module>
+   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.
+ 
+ [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)

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