This bug was fixed in the package ubuntu-advantage-tools - 27.2.1~21.04.1 --------------- ubuntu-advantage-tools (27.2.1~21.04.1) hirsute; urgency=medium
* Backport new upstream release: (LP: #1934902) to hirsute -- Chad Smith <[email protected]> Fri, 16 Jul 2021 12:49:23 -0600 ** Changed in: ubuntu-advantage-tools (Ubuntu Hirsute) Status: New => Fix Released ** Changed in: ubuntu-advantage-tools (Ubuntu Focal) Status: New => 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/1930741 Title: 20apt-esm-hook.conf is missing semicolons at end of option 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 Groovy: Won't Fix 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 caused aptdaemon to miss two configuration options that ubuntu-advantage-tools relies on for updating its messaging based on apt state. Apt itself parsed the options despite the syntax mistake, which led to a difference in understanding between apt and aptdaemon. This difference caused autopkgtest failures. Further, because aptdaemon could not parse these two options, it may result in operations triggered through aptdaemon not properly updating ubuntu advantage esm messaging. This means ubuntu-advantage-tools may print confusing or out of date messages related to esm in some cases. The fix is to add the semicolons required in the apt config syntax that we missed. This fix allows aptdaemon to parse all of our config settings, and means apt and aptdaemon will have a shared understanding of the configuration again. [Test Plan] These test steps assume that the proposed version of ua to release is available in ppa:ua-client/staging - check with the ubuntu-advantage- tools team before proceeding to make sure this is the case. Start a container of an affected release (tested in xenial, but should work on any affected release). Inside the container: ``` sudo apt update sudo apt install aptdaemon ``` Now run the following python3 script ``` from aptdaemon import config c = config.ConfigWriter() uataptconf = open("/etc/apt/apt.conf.d/20apt-esm-hook.conf") lines = uataptconf.readlines() print(c.parse(lines).keys()) uataptconf.close() ``` You should see output like the following: ``` dict_keys(['apt::install::post-invoke-success', 'apt::update::post-invoke-stats']) ``` Note that the above only includes 2 out of the 4 intended config settings from our config file. Now install the fixed version: ``` sudo add-apt-repository ppa:ua-client/staging sudo apt-get update sudo apt install ubuntu-advantage-tools ``` And run the above python script again. You should see output like the following: ``` dict_keys(['apt::install::pre-invoke', 'apt::install::post-invoke-success', 'apt::update::post-invoke-stats', 'aptcli::hooks::upgrade']) ``` Notice that it now finds all of the intended config settings. [Where problems could occur] The fix is adding two semicolons to the apt config file. The only problem that could occur is that, if a mistake was made, a similar apt config parsing problem could occur. Perhaps if this caused additional config parsing problems, then our message updating hooks would be broken in a different way from this bug. This would result in lack of, or out-of-date, messaging about esm packages from ubuntu-advantage- tools. [Other Info] A hotfix was already released to impish as 27.1.1 to stop the autopkgtest failures and unblock work that was interrupted by this bug. It successfully solved the issue. [Original Description] Recently aptdaemon started having autopkgtest failures with its tests.test_configparser.ConfigurationParserTestCase test. The failure follows: Test if credentials of repositories are store securely in a ... ok ====================================================================== ERROR: test_ (tests.test_configparser.ConfigurationParserTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/autopkgtest.cp3vHc/build.adU/src/tests/test_configparser.py", line 82, in test_ config[key.lower()]] KeyError: 'apt::install::pre-invoke' ---------------------------------------------------------------------- Ran 79 tests in 109.732s FAILED (errors=1, skipped=21) Test failed: <unittest.runner.TextTestResult run=79 errors=1 failures=0> error: Test failed: <unittest.runner.TextTestResult run=79 errors=1 failures=0> The "APT::Install::Pre-Invoke" key is provided by /etc/apt/apt.conf.d/20apt-esm-hook.conf which is from ubuntu- advantage-tools, so I'd guess this started happening when it moved to -updates (on 20210513). This would also explain why it is affecting every release. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1930741/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : [email protected] Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp

