Failing to parse apt_news if folder is not present

Bug #2008814 reported by Lucas Albuquerque Medeiros de Moura
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

Bug Description

[Impact]
We have the APT news structure now in place and user should be seeing messages related to it when running some apt commands. We store that information in a specific folder (/run/ubuntu-advantage) related to the pro client. If that folder is not present, we are not saving the contents of the apt news endpoint and because of that, users are not seeing that message.

[Test Case]

We have a integration test that already covers this scenario. We have added the results of running that test here in the comments.

[Regression Potential]

We are just creating the folder necessary to store the APT news data. What will happen is that users that are not seeing that message will now see it, which is what we expect.

If something fails with the directory creation, then the bug will persist: the client will log it, and people will not see apt news when running apt upgrade. As the command is run as root, there should be no permission error when creating a dir in /root.

[Discussion]

This folder should be present in the system if the user has run any pro command in the past. If that is not the case, then this bug happens. We are now always trying to create the folder before running the job that fetches the apt news messages

Related branches

description: updated
description: updated
description: updated
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Please test proposed package

Hello Lucas, 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.6~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
Andreas Hasenack (ahasenack) wrote :

Hello Lucas, 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.6~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
Andreas Hasenack (ahasenack) wrote :

Hello Lucas, 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.6~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
Andreas Hasenack (ahasenack) wrote :

Hello Lucas, 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.6~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
Andreas Hasenack (ahasenack) wrote :

Hello Lucas, 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.6~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
Renan Rodrigo (renanrodrigo) wrote :

We have run the integration test that verifies that the functionality which this bug affects works with the fix, using the package in -proposed.
There is no test for Kinetic, as the apt-news functionality is not there; the change was uploaded for consistency.

I am marking this bug as verification-done.

description: updated
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
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (ubuntu-advantage-tools/27.13.6~22.04.1)

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

software-properties/0.99.22.6 (amd64)

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/jammy/update_excuses.html#ubuntu-advantage-tools

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

Thank you!

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The autopkgtest failure from the previous comment was resolved with a retry. All DEP8 tests are green now, for all releases.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Regarding the fact that kinetic, being a non-LTS release, doesn't have apt-news support, could you please at least verify that in the kinetic upload, the /run/ubuntu-advantage directory is created as expected? In the case where no "pro" command was ever issued.

Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):

Note that users who install this update might still have to wait for a day to get the actual bugfix, as the apt-news service, which is what creates the missing directory, only runs if the last apt update is older than a day.

So if you did "apt update; apt dist-upgrade", you will get the updated u-a-t package, but since apt update was *just* run, the missing directory will only be created after 24h, when apt-news finally runs again.

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

Hello Andreas
Here is a run on a fresh Kinetic container, where I
- verify that running apt update does not create the directory
- install u-a-t from -proposed
- remove the stamp (to make sure the code runs)
- verify that running apt update does create the directory

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.

Thanks for the extra kinetic test. There is no apt_news there, but it verified the core fix.

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

There are no DEP8 regressions (a retry fixed the only one there was).

There is no SRU freeze ongoing at the moment.

There is no halted phasing on the previous update.

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

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

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

  * Backport new upstream release: (LP: #2008814) to kinetic

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

  * apt-news:
    - make sure systems which never ran a pro command get the apt-news message
      displayed (LP: #2008814)

 -- Renan Rodrigo <email address hidden> Tue, 28 Feb 2023 16:17:58 -0300

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.6~22.04.1

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

  * Backport new upstream release: (LP: #2008814) to jammy

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

  * apt-news:
    - make sure systems which never ran a pro command get the apt-news message
      displayed (LP: #2008814)

 -- Renan Rodrigo <email address hidden> Tue, 28 Feb 2023 16:17:51 -0300

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.6~20.04.1

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

  * Backport new upstream release: (LP: #2008814) to focal

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

  * apt-news:
    - make sure systems which never ran a pro command get the apt-news message
      displayed (LP: #2008814)

 -- Renan Rodrigo <email address hidden> Tue, 28 Feb 2023 16:17:46 -0300

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.6~18.04.1

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

  * Backport new upstream release: (LP: #2008814) to bionic

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

  * apt-news:
    - make sure systems which never ran a pro command get the apt-news message
      displayed (LP: #2008814)

 -- Renan Rodrigo <email address hidden> Tue, 28 Feb 2023 16:17:41 -0300

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.6~16.04.1

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

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

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

  * apt-news:
    - make sure systems which never ran a pro command get the apt-news message
      displayed (LP: #2008814)

 -- Renan Rodrigo <email address hidden> Tue, 28 Feb 2023 16:17:34 -0300

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

The lunar upload is in lunar-proposed.

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

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

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

  * apt-news:
    - make sure systems which never ran a pro command get the apt-news message
      displayed (LP: #2008814)

 -- Renan Rodrigo <email address hidden> Tue, 28 Feb 2023 15:56:11 -0300

Changed in ubuntu-advantage-tools (Ubuntu):
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.