[FFe] updated needrestart (form git) for Jammy

Bug #1965090 reported by Christian Ehrhardt 
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
needrestart (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

[Rationale]

Hi,
there was no new version tagged for about two years now.
But plenty of fixes that are IMHO important for Jammy have piled up.
Especially since needrestart is installed and enabled by default I'd think this makes sense to not have too many people run into known issues that we then have to SRU.

Feel free to have your own look at the commits since v3.5 - there are not too many IMHO:
- https://github.com/liske/needrestart/commits/master

In that list are a lot of non-important but also not bad things like fixing typos and updating changelogs as well as license information.
But there are also quite a list of things I'd think we want for Jammy, those are:

Some fixes are already applied in Debian, but others are missing.

Jammy compatibility
- work with new LXD
  - https://github.com/liske/needrestart/pull/188
  - https://github.com/liske/needrestart/pull/215
- compatibility with cgroup v2 (now default)
  - https://github.com/liske/needrestart/pull/238
  - https://github.com/liske/needrestart/pull/234

Useful features several people always wanted
- VM detection https://github.com/liske/needrestart/pull/216

I'm proposing to update needrestart to master (https://github.com/liske/needrestart/commits/master) and for that would want the ack of the release team (for the FFe) and if possible also the Foundations-team POV ack as they officially own the package.

[Content]

The planned upload is pre-build for your evaluation in a PPA
=> https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4804/+packages

The Delta to be applied can be seen in git:
https://code.launchpad.net/~paelzer/ubuntu/+source/needrestart/+git/needrestart/+ref/update-jammy-to-git-1965090

Those are all plain patches (no changes needed) as they come from upstream

[Testing]

Build-log: https://launchpadlibrarian.net/590844310/buildlog_ubuntu-jammy-amd64.needrestart_3.5-5ubuntu2~jammyppa1_BUILDING.txt.gz

Autopkgtests running on the PPA are all good:

Results from https://autopkgtest.ubuntu.com/results/autopkgtest-jammy-ci-train-ppa-service-4804/?format=plain:
  freedombox @ amd64:
    18.03.22 07:56:50 Log 🗒️ ✅ Triggers: ['needrestart/3.5-5ubuntu2~jammyppa3']
      command1 PASS ✅
      command2 PASS ✅
  needrestart @ amd64:
    18.03.22 08:00:35 Log 🗒️ ✅ Triggers: ['needrestart/3.5-5ubuntu2~jammyppa3']
      sanity-test.sh PASS ✅
  freedombox @ arm64:
    18.03.22 08:16:52 Log 🗒️ ✅ Triggers: ['needrestart/3.5-5ubuntu2~jammyppa3']
      command1 PASS ✅
      command2 PASS ✅
  needrestart @ arm64:
    18.03.22 10:22:34 Log 🗒️ ✅ Triggers: ['needrestart/3.5-5ubuntu2~jammyppa3']
      sanity-test.sh PASS ✅
  freedombox @ armhf:
    18.03.22 08:01:41 Log 🗒️ ✅ Triggers: ['needrestart/3.5-5ubuntu2~jammyppa3']
      command1 PASS ✅
      command2 PASS ✅
  needrestart @ armhf:
    18.03.22 07:59:13 Log 🗒️ ✅ Triggers: ['needrestart/3.5-5ubuntu2~jammyppa3']
      sanity-test.sh PASS ✅
  freedombox @ ppc64el:
    18.03.22 08:05:42 Log 🗒️ ✅ Triggers: ['needrestart/3.5-5ubuntu2~jammyppa3']
      command1 PASS ✅
      command2 PASS ✅
  needrestart @ ppc64el:
    18.03.22 08:10:12 Log 🗒️ ✅ Triggers: ['needrestart/3.5-5ubuntu2~jammyppa3']
      sanity-test.sh PASS ✅
  freedombox @ s390x:
    18.03.22 08:03:58 Log 🗒️ ✅ Triggers: ['needrestart/3.5-5ubuntu2~jammyppa3']
      command1 PASS ✅
      command2 PASS ✅
  needrestart @ s390x:
    18.03.22 08:08:46 Log 🗒️ ✅ Triggers: ['needrestart/3.5-5ubuntu2~jammyppa3']
      sanity-test.sh PASS ✅
Running:
Waiting:

The logs in comment 3 - comment 6 contain:
- Manual tests for the general use
- add install log
- add upgrade log

Tags: server-todo

Related branches

description: updated
description: updated
description: updated
description: updated
tags: added: server-todo
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Testing is still ongoing (if only the time I can dedicate wouldn't be so scarce).
Right now I see this on install:

Error parsing /etc/needrestart/needrestart.conf: Can't modify anonymous hash ({}) in scalar assignment at (eval 14) line 111, near "0,"
Unmatched right curly bracket at (eval 14) line 112, at end of line
syntax error at (eval 14) line 112, near "qr(^virtlockd)}"
Unmatched right curly bracket at (eval 14) line 133, at end of line

That is an issue I brought upstream :-/ but already fixed, applying ...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

New build in PPA fixing this ...

Changed in needrestart (Ubuntu):
assignee: nobody → Christian Ehrhardt  (paelzer)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

1. Install log (of the new version):

root@j-needrestart:~/testnr# apt install needrestart
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'apt autoremove' to remove it.
Suggested packages:
  needrestart-session | libnotify-bin iucode-tool
The following NEW packages will be installed:
  needrestart
0 upgraded, 1 newly installed, 0 to remove and 229 not upgraded.
Need to get 44.7 kB of archives.
After this operation, 512 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ci-train-ppa-service/4804/ubuntu jammy/main amd64 needrestart all 3.5-5ubuntu2~jammyppa3 [44.7 kB]
Fetched 44.7 kB in 0s (438 kB/s)
Selecting previously unselected package needrestart.
(Reading database ... 33993 files and directories currently installed.)
Preparing to unpack .../needrestart_3.5-5ubuntu2~jammyppa3_all.deb ...
Unpacking needrestart (3.5-5ubuntu2~jammyppa3) ...
Setting up needrestart (3.5-5ubuntu2~jammyppa3) ...
Processing triggers for man-db (2.9.4-4) ...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

2. Upgrade log (current to new version)

root@j-needrestart:~/testnr# apt install needrestart
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'apt autoremove' to remove it.
Suggested packages:
  needrestart-session | libnotify-bin iucode-tool
The following packages will be upgraded:
  needrestart
1 upgraded, 0 newly installed, 0 to remove and 229 not upgraded.
Need to get 44.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ci-train-ppa-service/4804/ubuntu jammy/main amd64 needrestart all 3.5-5ubuntu2~jammyppa3 [44.7 kB]
Fetched 44.7 kB in 0s (293 kB/s)
(Reading database ... 34070 files and directories currently installed.)
Preparing to unpack .../needrestart_3.5-5ubuntu2~jammyppa3_all.deb ...
Unpacking needrestart (3.5-5ubuntu2~jammyppa3) over (3.5-5ubuntu1) ...
Setting up needrestart (3.5-5ubuntu2~jammyppa3) ...
Installing new version of config file /etc/needrestart/needrestart.conf ...
Installing new version of config file /etc/needrestart/notify.d/400-notify-send ...
Installing new version of config file /etc/needrestart/notify.d/600-mail ...
Installing new version of config file /etc/needrestart/restart.d/dbus.service ...
Processing triggers for man-db (2.9.4-4) ...
Scanning processes...

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

3. Tail of a log updating various packages showing (the new) needrestart as invoked by apt

...
Processing triggers for install-info (6.8-4build1) ...
Processing triggers for libc-bin (2.35-0ubuntu3) ...
Processing triggers for rsyslog (8.2112.0-2ubuntu2) ...
Processing triggers for initramfs-tools (0.140ubuntu13) ...
Processing triggers for dbus (1.12.20-2ubuntu3) ...
Scanning processes...
Scanning candidates...

Restarting services...
 systemctl restart cron.service systemd-resolved.service
Service restarts being deferred:
 systemctl restart console-getty.service

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

4. detecting VMs

4a) no outdated ones

root@j-needrestart:~# needrestart
Scanning processes...

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

4b) avoid restarting services that should not be restarted
(done by upgrading to jammy proposed which brings enough new things)

First of all we see virtlog.service now being default disabled (important)
  [ ] virtlogd.service
As restarting this one might break things.

4c) outdated VM binaries
And furthermore we see at in the invocation of needrestart by apt:

...
No containers need to be restarted.

No user sessions are running outdated binaries.

VM guests are running outdated hypervisor (qemu) binaries on this host:
 'testguest' with pid 4190

description: updated
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I think the FFE and upload is prepared, time to ask Foundations (as package owners and for the release team members there) to have a look at the bug and MR to ack&sponsor if they are ok with it.

Changed in needrestart (Ubuntu):
assignee: Christian Ehrhardt  (paelzer) → nobody
Changed in needrestart (Ubuntu):
status: New → In Progress
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

So from the FFe POV I think this might be good, but I'd like to reach out to other Foundations members (especially those that are responsible for needrestart) to see if this is something we planned for for 22.04. The list of changes you mentioned feel like a 'yes' to me, though.

Changed in needrestart (Ubuntu):
status: In Progress → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Got a Team ack on MM, uploading this now ...

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading needrestart_3.5-5ubuntu2.dsc: done.
  Uploading needrestart_3.5-5ubuntu2.debian.tar.xz: done.
  Uploading needrestart_3.5-5ubuntu2_source.buildinfo: done.
  Uploading needrestart_3.5-5ubuntu2_source.changes: done.
Successfully uploaded packages.

Changed in needrestart (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package needrestart - 3.5-5ubuntu2

---------------
needrestart (3.5-5ubuntu2) jammy; urgency=medium

  * d/p/Jammy-update-to-git*: Update needrestart from git (LP: #1965090)
    - fixes handling with cgroupv2 for docker and lxd (LP: #1964445)
    - adds detection of qemu VMs using outdated libs
    - various minor fixes

 -- Christian Ehrhardt <email address hidden> Wed, 16 Mar 2022 08:53:23 +0100

Changed in needrestart (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.