[Bug 2084571] [NEW] needrestart: container restart is broken
Simon Chopin
2084571 at bugs.launchpad.net
Tue Oct 15 15:19:43 UTC 2024
Public bug reported:
[ Impact ]
needrestart supports restarting containers with outdated binaries when
running in the context of the hypervisor, however said support appears
to be broken in Noble and Oracular.
While we do not want to handle containers as part of the APT-triggered
restarts, the user might rely on that particular feature in their own
scripts.
This will get fixed by backporting an upstream fix, as well as amending
the Ubuntu-mode patch.
[ Test plan ]
```
apt install -t noble-proposed needrestart
lxc launch ubuntu-daily:noble to-be-restarted
lxc exec to-be-restarted touch /tmp/restart-marker
lxc exec to-be-restarted apt remove needrestart # we don't want it to restart outdated services from within the container!
lxc exec to-be-restarted apt reinstall libc6 # should make a whole lot of things outdated.
apt reinstall libc-bin # the actual package doesn't matter, we just want the needrestart hook in an APT context
sleep 3 # to be sure, wait a bit for any container restart to take effect
lxc exec to-be-restarted stat /tmp/restart-marker # This is SUPPOSED TO WORK, we don't want the APT hook to touch containers
needrestart -r a
sleep 3 # to make sure any restart has time to take effect
lxc exec to-be-restarted stat /tmp/restart-marker # This is SUPPOSED TO FAIL, the container should have restarted.
```
[ Where problems could occur ]
While the "Ubuntu mode" code is touched to avoid restarting containers, errors in that code could lead to
us restarting user containers during unattended-upgrades, hence the relevant test in the test plan.
** Affects: needrestart (Ubuntu)
Importance: Medium
Assignee: Simon Chopin (schopin)
Status: In Progress
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to needrestart in Ubuntu.
https://bugs.launchpad.net/bugs/2084571
Title:
needrestart: container restart is broken
Status in needrestart package in Ubuntu:
In Progress
Bug description:
[ Impact ]
needrestart supports restarting containers with outdated binaries when
running in the context of the hypervisor, however said support appears
to be broken in Noble and Oracular.
While we do not want to handle containers as part of the APT-triggered
restarts, the user might rely on that particular feature in their own
scripts.
This will get fixed by backporting an upstream fix, as well as
amending the Ubuntu-mode patch.
[ Test plan ]
```
apt install -t noble-proposed needrestart
lxc launch ubuntu-daily:noble to-be-restarted
lxc exec to-be-restarted touch /tmp/restart-marker
lxc exec to-be-restarted apt remove needrestart # we don't want it to restart outdated services from within the container!
lxc exec to-be-restarted apt reinstall libc6 # should make a whole lot of things outdated.
apt reinstall libc-bin # the actual package doesn't matter, we just want the needrestart hook in an APT context
sleep 3 # to be sure, wait a bit for any container restart to take effect
lxc exec to-be-restarted stat /tmp/restart-marker # This is SUPPOSED TO WORK, we don't want the APT hook to touch containers
needrestart -r a
sleep 3 # to make sure any restart has time to take effect
lxc exec to-be-restarted stat /tmp/restart-marker # This is SUPPOSED TO FAIL, the container should have restarted.
```
[ Where problems could occur ]
While the "Ubuntu mode" code is touched to avoid restarting containers, errors in that code could lead to
us restarting user containers during unattended-upgrades, hence the relevant test in the test plan.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/needrestart/+bug/2084571/+subscriptions
More information about the foundations-bugs
mailing list