preinst conffile prompt avoidance restores wrong conffile for later versions

Bug #2004279 reported by Grant Orndorff
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned
Lunar
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Users who upgrade from 27.13.X to the next version (27.13.3) could experience one of two things:

If they had run `pro config set apt_news=false` then our preinst code to handle that conffile change will not do anything because the md5sum in `preinst` is incomplete. This is okay because we haven't changed the default conffile in 27.13.3, but we should still fix it as it could affect future versions.

If they had run `pro config set apt_news=true` then our preinst code would restore a non-default conffile, so the user would still have an edited conffile even after the preinst code runs. This is also okay for now because we haven't changed the default conffile in 27.13.3, but we should still fix it as it could affect future versions.

[Test Case]
Ensure the following upgrade paths do not cause conffile prompts:

27.11.3 -> 27.13.3 and debsums -e ubuntu-advantage-tools is OK
27.11.3 with pro config set apt_news=false -> 27.13.3
27.11.3 with pro config set apt_news=true -> 27.13.3 and debsums -e ubuntu-advantage-tools is OK

27.12 -> 27.13.3 and debsums -e ubuntu-advantage-tools is OK
27.12 with pro config set apt_news=false -> 27.13.3
27.12 with pro config set apt_news=true -> 27.13.3 and debsums -e ubuntu-advantage-tools is OK

27.13.1 -> 27.13.3 and debsums -e ubuntu-advantage-tools is OK
27.13.1 with pro config set apt_news=false -> 27.13.3
27.13.1 with pro config set apt_news=true -> 27.13.3 and debsums -e ubuntu-advantage-tools is OK

27.13.2 -> 27.13.3 and debsums -e ubuntu-advantage-tools is OK
27.13.2 with pro config set apt_news=false -> 27.13.3
27.13.2 with pro config set apt_news=true -> 27.13.3 and debsums -e ubuntu-advantage-tools is OK

[Regression Potential]
We haven't done the proper fix for #2003977 yet, so if we didn't properly update the preinst hack to avoid prompts, that bug may reoccur. As part of this release we are ensuring the checksums in preinst are accurate and will still properly gaurd against this bug for upgrades from all applicable versions: 27.11.3, 27.12, 27.13.1, 27.13.2. Testing these upgrade paths is a part of the verification for this SRU.

[Discussion]
This is an extension of the temporary fix for #2003977 - it is not a permanent solution. We will introduce a permanent solution in our next release: 27.13.4. The permanent solution is being tracked in #2004280

Related branches

description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Grant, or anyone else affected,

Accepted ubuntu-advantage-tools into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.13.3~22.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-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. 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.

Changed in ubuntu-advantage-tools (Ubuntu Kinetic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in ubuntu-advantage-tools (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Robie Basak (racb) wrote :

Hello Grant, or anyone else affected,

Accepted ubuntu-advantage-tools into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.13.3~22.04.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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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.

Changed in ubuntu-advantage-tools (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Robie Basak (racb) wrote :

Hello Grant, or anyone else affected,

Accepted ubuntu-advantage-tools into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.13.3~20.04.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-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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.

Changed in ubuntu-advantage-tools (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Robie Basak (racb) wrote :

Hello Grant, or anyone else affected,

Accepted ubuntu-advantage-tools into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.13.3~18.04.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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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.

Changed in ubuntu-advantage-tools (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Robie Basak (racb) wrote :

Hello Grant, or anyone else affected,

Accepted ubuntu-advantage-tools into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-advantage-tools/27.13.3~16.04.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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. 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.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (ubuntu-advantage-tools/27.13.3~18.04.1)

All autopkgtests for the newly accepted ubuntu-advantage-tools (27.13.3~18.04.1) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

ubuntu-advantage-tools/unknown (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#ubuntu-advantage-tools

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

Attached are a script used to test all 12 cases described across all 5 ubuntu releases, as well as the output of that script.

The script/output includes "VERIFY" in all caps in particularly important places to check.

I've looked over the output and am satisfied that it is working so I'm marking verification done for all releases.

tags: added: verification-done verification-done-bionic verification-done-focal verification-done-jammy verification-done-kinetic verification-done-xenial
removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-xenial
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I verified the attached logs and am satisfied that they show the executed planned test case, and that the results are correct.

I did a spot check in the provided logs, and also ran some tests manually on jammy, and confirmed the behavior. Finally, I also hacked the test script to introduce an unexpected change to the config file to force a conf file prompt, and it correctly stopped at that prompt. The provided logs do not show such a prompt or stalling behavior, so I'm satisfied that no conf prompt happened during the full run.

The package built correctly in all architectures and ubuntu releases it was meant for.

There is one DEP8 regression in bionic/arm64, but that is caused by an unrelated update to grub/shim/signed and is being handled in https://bugs.launchpad.net/ubuntu/+source/grub2-signed/+bug/1936857

There is no SRU freeze ongoing at the moment.

The previous ubuntu-advantage-tools SRU is in a halted phasing state, which is what this bug here is about.

Changed in ubuntu-advantage-tools (Ubuntu Lunar):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.13.3~23.04.1

---------------
ubuntu-advantage-tools (27.13.3~23.04.1) lunar; urgency=medium

  * d/ubuntu-advantage-tools.preinst: (LP: #2004279)
    - correct second set of md5sums to continue avoiding a dpkg conf prompt
      if the only change to the original config file was to the apt_news flag
    - restore correct default uaclient.conf when upgrading from 27.13.X and
      the only conf change is apt_news
  * esm-cache.service:
    - Catch errors when esm.ubuntu.com is unreachable to avoid causing crash
      reports and degraded systemd status from this non-critical service
      (LP: #2004130)

 -- Grant Orndorff <email address hidden> Mon, 30 Jan 2023 09:34:43 -0500

Changed in ubuntu-advantage-tools (Ubuntu Lunar):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.13.3~22.10.1

---------------
ubuntu-advantage-tools (27.13.3~22.10.1) kinetic; urgency=medium

  * Backport new upstream release: (LP: #2004130 and LP: #2004279) to
    kinetic

ubuntu-advantage-tools (27.13.3~23.04.1) lunar; urgency=medium

  * d/ubuntu-advantage-tools.preinst: (LP: #2004279)
    - correct second set of md5sums to continue avoiding a dpkg conf prompt
      if the only change to the original config file was to the apt_news flag
    - restore correct default uaclient.conf when upgrading from 27.13.X and
      the only conf change is apt_news
  * esm-cache.service:
    - Catch errors when esm.ubuntu.com is unreachable to avoid causing crash
      reports and degraded systemd status from this non-critical service
      (LP: #2004130)

 -- Grant Orndorff <email address hidden> Tue, 31 Jan 2023 10:08:19 -0500

Changed in ubuntu-advantage-tools (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for ubuntu-advantage-tools has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.13.3~22.04.1

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

  * Backport new upstream release: (LP: #2004130 and LP: #2004279) to
    jammy

ubuntu-advantage-tools (27.13.3~23.04.1) lunar; urgency=medium

  * d/ubuntu-advantage-tools.preinst: (LP: #2004279)
    - correct second set of md5sums to continue avoiding a dpkg conf prompt
      if the only change to the original config file was to the apt_news flag
    - restore correct default uaclient.conf when upgrading from 27.13.X and
      the only conf change is apt_news
  * esm-cache.service:
    - Catch errors when esm.ubuntu.com is unreachable to avoid causing crash
      reports and degraded systemd status from this non-critical service
      (LP: #2004130)

 -- Grant Orndorff <email address hidden> Tue, 31 Jan 2023 10:08:06 -0500

Changed in ubuntu-advantage-tools (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.13.3~20.04.1

---------------
ubuntu-advantage-tools (27.13.3~20.04.1) focal; urgency=medium

  * Backport new upstream release: (LP: #2004130 and LP: #2004279) to
    focal

ubuntu-advantage-tools (27.13.3~23.04.1) lunar; urgency=medium

  * d/ubuntu-advantage-tools.preinst: (LP: #2004279)
    - correct second set of md5sums to continue avoiding a dpkg conf prompt
      if the only change to the original config file was to the apt_news flag
    - restore correct default uaclient.conf when upgrading from 27.13.X and
      the only conf change is apt_news
  * esm-cache.service:
    - Catch errors when esm.ubuntu.com is unreachable to avoid causing crash
      reports and degraded systemd status from this non-critical service
      (LP: #2004130)

 -- Grant Orndorff <email address hidden> Tue, 31 Jan 2023 10:08:02 -0500

Changed in ubuntu-advantage-tools (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-advantage-tools - 27.13.3~18.04.1

---------------
ubuntu-advantage-tools (27.13.3~18.04.1) bionic; urgency=medium

  * Backport new upstream release: (LP: #2004130 and LP: #2004279) to
    bionic

ubuntu-advantage-tools (27.13.3~23.04.1) lunar; urgency=medium

  * d/ubuntu-advantage-tools.preinst: (LP: #2004279)
    - correct second set of md5sums to continue avoiding a dpkg conf prompt
      if the only change to the original config file was to the apt_news flag
    - restore correct default uaclient.conf when upgrading from 27.13.X and
      the only conf change is apt_news
  * esm-cache.service:
    - Catch errors when esm.ubuntu.com is unreachable to avoid causing crash
      reports and degraded systemd status from this non-critical service
      (LP: #2004130)

 -- Grant Orndorff <email address hidden> Tue, 31 Jan 2023 10:07:56 -0500

Changed in ubuntu-advantage-tools (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * Backport new upstream release: (LP: #2004130 and LP: #2004279) to
    xenial

ubuntu-advantage-tools (27.13.3~23.04.1) lunar; urgency=medium

  * d/ubuntu-advantage-tools.preinst: (LP: #2004279)
    - correct second set of md5sums to continue avoiding a dpkg conf prompt
      if the only change to the original config file was to the apt_news flag
    - restore correct default uaclient.conf when upgrading from 27.13.X and
      the only conf change is apt_news
  * esm-cache.service:
    - Catch errors when esm.ubuntu.com is unreachable to avoid causing crash
      reports and degraded systemd status from this non-critical service
      (LP: #2004130)

 -- Grant Orndorff <email address hidden> Tue, 31 Jan 2023 10:07:50 -0500

Changed in ubuntu-advantage-tools (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.