4 ms·
A related gripe I have with Debian-based distros is that APT shuts down daemons and keeps them down for an unreasonably long time while it updates seemingly unr
by kijin 5y ago
A related gripe I have with Debian-based distros is that APT shuts down daemons and keeps them down for an unreasonably long time while it updates seemingly unrelated packages.
This is especially annoying on desktop Ubuntu boxes with automatic updates turned on. You're working on some frontend code and bam! nginx is down, the database is down.
It should only take a second to restart foo.service after updating foo. Why shut it down so early and wait while APT is updating the kernel and a whole bunch of other packages? Probably because shutting eveyrthing down makes it easier for the postinstall script to do a clean job.
YUM/DNF don't do this. They just update things and let me restart things at my leisure.
- ex_amazon_sde 5y ago> APT shuts down daemons and keeps them down for an unreasonably long Are you doing live upgrades on production servers? Don't. If you are doing updates anywhere else a couple of seconds of downtime is negligible.
- kijin 5y agoWho said it was a live server? And it can take much longer than a couple of seconds. Did you even read the parent comment?
- uggedal 5y agodnf has recently added automatic restart support of systemd system services (and soon user services). It's opt-in per package, but expect things to restart more in the future.
- kijin 5y agoRestart is fine. It only takes a fraction of a second. But APT doesn't do restarts. It stops services and doesn't start them back up until it's finished with all the other packages. This can take a few minutes if there are kernel updates that trigger multiple initramfs rebuilds, or indefinitely long if the update process throws up a dialog to confirm something. OP makes it clear why this is happening. Packages have no concept of an upgrade, so APT stops services before removing the old version, and starts them back up after installing the new version.
- mschuster91 5y ago> Probably because shutting eveyrthing down makes it easier for the postinstall script to do a clean job. It's also safer, at least for software that spawns instead of forks child processes - think of php-fpm pools, for example. You might end up with (let's say) nginx having one half of the pool on php8.0.0 and one half on php8.0.10 otherwise. As for automatic updates... I like the way macOS operates, it asks the user for a confirmation to apply updates. Fully automated updates are a bad idea sigh