Control: tag -1 pending patch Hi all,
On Wed, 2 Feb 2022 16:16:24 +0100 "L.Schmidt" <l...@scarydevilmonastery.net> wrote:
Package apt-get is a placeholder for https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#backup as it's with apt-get dist-upgrade that the potential problem manifests. The problem scenario is as such: Some services have the task of keeping services running. Specific service in this case is "monit" from package "monit": It periodically probes whether selected services still respond, and takes action if they don't. The exact nature of the response (as, the command for restarting a service) is user configurable, per service. monit comes with a set of preconfigured rules to restart common services. The problem arises when apt-get dist-upgrade stops services, prior to upgrading them. During that time is it possible that the monit probe takes place, and monit detects a stopped service, consequently taking actions to restart it. This may conflict and potentially sabotage apt-get's attempt to upgrade a package. As it seems that Debian has no provisions to deal with this potential problem, a clarification in https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#backup may be helpful, adding the suggestion to stop services such as monit prior to dist-upgrade. Observed today when dist-upgrading from oldstable to stable, when multiple services were restarted by monit while upgrading those wasn't yet complete. Real fix in this case may be to ask monit maintainers to take care of the default service restarting scripts in a way that this described scenario won't occur - but there exist more of such services, therefore this potential problem may not be specific to monit. And still, as the actions are user-configurable, a simple /etc/init.d/foo start or service foo start as configured restart command may not catch the situation of a dist-upgrade running. So I think it may be, for now, merely a documentation issue: ask folks to stop such a service prior to dist-upgrade.
How does the following look? diff --git a/en/upgrading.dbk b/en/upgrading.dbk index 75438d31..e2107bad 100644 --- a/en/upgrading.dbk +++ b/en/upgrading.dbk@@ -1006,6 +1006,18 @@ E: You don't have enough free space in /var/cache/apt/archives/.
</para> </section> + <section id="stop-monitoring-systems"> + <title>Stop monitoring systems</title> + <para> + As <command>apt</command> may need to temporarily stop services + running on your computer, it's probably a good idea to stop + monitoring services that can restart other terminated services + during the upgrade. In Debian, <systemitem + role="package">monit</systemitem> is an example of such a + service. + </para> + </section> + <section id="minimal-upgrade"> <title>Minimal system upgrade</title> <para> Paul
OpenPGP_signature
Description: OpenPGP digital signature