Doesn't communicate about applied livepatch on start

Bug #1800862 reported by Sebastien Bacher on 2018-10-31
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Medium
Andrea Azzarone
Bionic
Undecided
Unassigned

Bug Description

* Impact

The "livepatch updates have been applied" notifications might be missing if the event happened before the user logged in

* Test case

The real testcase is to make sure that a notification is displayed when a livepatch update is applied.

That can also be simulated by writting "applied 1" in /var/snap/canonical-livepatch/current/status before logging in, the notification should be displayed when GNOME is loaded.

* Regression potential

The code change are in the livepatch notifications handling, just make sure those are displayed as expected

------------------------

The update-notifier livepatch code seems to only react to event, but since it's slow to start (it's in the graphical session and delayed by 60s) it's likely that livepatch refresh is done before update-notifier is ready and such the user feedback is never send.

We should probably change update-notifier to do send the notification on start if there is any applied change (it's going to nag at every login but that's somewhat a feature/better, since it reassure to the user that he has those fixes in place)

Wdyt?

Related branches

Sebastien Bacher (seb128) wrote :

From the discussion on IRC, the status might be wrong after reboot since it's only updated when livepatch apply changes

Ideally
- livepatch should delete/update that file on refresh if the status is that there is update (to check if that's not the case today)
- if the state might be wrong after reboot/new kernel deb is applied, then maybe compare uptime to timestamp of the file
- the status should maybe be deleted on reboot since the status is resetted on reboot?

Some of those issues should probably be fix to the livepatch snap

Andrea Azzarone (azzar1) on 2018-11-02
Changed in update-notifier (Ubuntu):
status: New → In Progress
assignee: nobody → Andrea Azzarone (azzar1)
importance: Undecided → Medium
Sebastien Bacher (seb128) wrote :

Uploaded to Disco and Bionic, no point SRUing to Cosmic since livepatch isn't provided on LTS series

Changed in update-notifier (Ubuntu):
status: In Progress → Fix Committed
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 3.192.10

---------------
update-notifier (3.192.10) disco; urgency=medium

  [ Andrea Azzarone ]
  * data/apt_check.py, data/package-data-downloader, tests/test_pep8.py:
    - update the code formating to be not hit W504 warnings,
      change to ignore W503 and be consistent with update-manager.

 -- Sebastien Bacher <email address hidden> Tue, 13 Nov 2018 21:49:10 +0100

Changed in update-notifier (Ubuntu):
status: Fix Committed → Fix Released

Hello Sebastien, or anyone else affected,

Accepted update-notifier into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-notifier/3.192.1.4 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 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 update-notifier (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Andrea Azzarone (azzar1) wrote :

I installed update-notifier from bionic-proposed:
```
apt-cache policy update-notifier
update-notifier:
  Installed: 3.192.1.4
  Candidate: 3.192.1.4
  Version table:
 *** 3.192.1.4 500
        500 http://us.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages
```

I performed the following manual tests:
- boot, wait for update-notifier to start, manually modify the status file: notification was displayed
- reboot: at the boot no notification was displayed as expected
- reboot, manually modify the status file before login, login: notification was displayed
- boot with kernel 4.15.0-38.41-generic: a notification was displayed

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-notifier - 3.192.1.4

---------------
update-notifier (3.192.1.4) bionic; urgency=medium

  * Check if a Livepatch patch has been applied during boot or before
    update-notifier has started. (LP: #1800862)

 -- Andrea Azzarone <email address hidden> Fri, 02 Nov 2018 11:34:03 +0000

Changed in update-notifier (Ubuntu Bionic):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for update-notifier has completed successfully and the package has now been 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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers