Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please don't list unattended-upgrades.service as restartable #211

Open
rbalint opened this issue Apr 22, 2021 · 5 comments
Open

Please don't list unattended-upgrades.service as restartable #211

rbalint opened this issue Apr 22, 2021 · 5 comments

Comments

@rbalint
Copy link

rbalint commented Apr 22, 2021

Unattended-upgrades service does very little that can be affected by a library update, and it's main purpose is delaying shutdown to ensure that package upgrades are not interrupted in the middle.
It is listed as a service not to be restarted, but I'd like to propose blacklisting it instead to not even show up in needrestart.

@liske liske added the wishlist label Sep 18, 2021
@pabs3
Copy link

pabs3 commented Mar 17, 2022

It is possible to restart unattended-upgrades.service.

When there is no upgrade happening, restarting it is consequence-free. When there is an upgrade happening, if restarting were to fail then the package upgrade could be interrupted. Usually restarting it won't fail though.

Restarting it means that the old libraries/binaries don't need to be kept in RAM and unlinked on disk but still using storage.

@rbalint so I think unattended-upgrades.service should be restarted automatically (when that is enabled) but only when package upgrades are not running.

When package upgrades are running, it would be reasonable to require confirmation before allowing it to be restarted. Or doing some sort of test restart before restarting it properly.

@liske
Copy link
Owner

liske commented May 18, 2022

Maybe one could write a custom restart script in /etc/needrestart/restart.d which does restart unattended-upgrades only if no upgrade is happening. Is there a reliable way to test if unattended-upgrade is doing an upgrade?

@rbalint
Copy link
Author

rbalint commented May 18, 2022

There is very little point in restarting the service because it is highly unlikely that any change in any of its dependencies would change its behavior. Also @mvo5 please continue the discussion here because I'm not maintaining unattended-upgrades currently just no one made an upload since then: mvo5/unattended-upgrades#308 .

@pabs3
Copy link

pabs3 commented May 19, 2022 via email

1 similar comment
@pabs3
Copy link

pabs3 commented Oct 11, 2022 via email

@liske liske added the moreinfo label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants