You are not logged in.

#26 2018-04-02 07:09:53

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Restart all updated services

jernst wrote:

I would be perfectly fine if the automation failed under some circumstances.

Assuming you understood that loqs told you that the service restarts broke the running system and if  you *really* just want to blindly restart a service everytime the providing package or one of its dependencies is updated and are totally willing to, in doubt, do that for no actualy reason while on the other hand risk to shoot yourself: that's as trivial as it gets, add alpm hooks, "man 5 alpm-hooks"

If you just struggle how to figure which binaries (and libraries) are directly invoked by the service, "man grep", "man ldd".
If you want to figure which binaries and libraries are indirectly involved, see my former post.

But let me add and stress that I certainly do not endorse such approach, let alone the case of unguarded automation.

Offline

#27 2018-04-02 18:09:52

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Restart all updated services

1) The only thing rebooting gets you which restarting every single running program would *not* get you, is applying kernel updates. But rebooting is much slower, comparatively, than just restarting select services.

2) There is no point updating your system at all, if your recipe for success is "wtf restarting things is stupid, it works fine". Manifestly it does not work "fine", if by "fine" you mean "all those security updates are actually in use" and your server is no longer running vulnerable versions of everything.

3) https://wiki.archlinux.org/index.php/Us … _server.3F


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#28 2018-04-03 00:59:53

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: Restart all updated services

Eschwartz wrote:

1) The only thing rebooting gets you which restarting every single running program would *not* get you, is applying kernel updates. But rebooting is much slower, comparatively, than just restarting select services.

System dependent. On an SSD based system it would be, at most, only slightly slower.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#29 2018-04-03 01:11:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Restart all updated services

ngoonee wrote:

System dependent. On an SSD based system it would be, at most, only slightly slower.

Certainly true on the first point, but I'd disagree on the second.  For a home system, sure, boot time on an SSD can be fairly trivial.  But on a server, downtime is downtime.  Services can be restarted/reloaded instantaneously with no service interuption.

(wonders if my original answer of `systemctl daemon-reload` is going to be taken seriously yet: merge any pacnews, and daemon-reload, that's it, it couldn't be simpler.)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#30 2018-04-03 01:13:02

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Restart all updated services

ngoonee wrote:
Eschwartz wrote:

1) The only thing rebooting gets you which restarting every single running program would *not* get you, is applying kernel updates. But rebooting is much slower, comparatively, than just restarting select services.

System dependent. On an SSD based system it would be, at most, only slightly slower.

Are you measuring by percentage or by absolute time? Because I think the former still qualifies, and that is without factoring in hardware which incurs hard costs in POST and suchlike (for which an SSD does nothing).


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#31 2018-04-03 04:47:28

amish
Member
Registered: 2014-05-10
Posts: 470

Re: Restart all updated services

Trilby wrote:

(wonders if my original answer of `systemctl daemon-reload` is going to be taken seriously yet: merge any pacnews, and daemon-reload, that's it, it couldn't be simpler.)

daemon-reload only reloads systemd manager configuration not the actual services (daemons) that changed.

If your update had new security updates or new feature or bug fix then "systemctl daemon-reload" will NOT do anything.

You will have to restart the related services. Unless ofcourse you are not at all bothered about new updates.

In that case why update at all? Instead update only when you are ready to restart services.

PS: "You" here is used in general not directed to anyone.

Last edited by amish (2018-04-03 04:50:07)

Offline

#32 2018-04-03 11:13:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Restart all updated services

Then restart any service that is needed, `systemctl restart` is still effectively instantaneous and will not result in downtime.

But not all services are a single process that just "runs forever", many spawn processes as needed.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#33 2018-04-03 11:34:37

amish
Member
Registered: 2014-05-10
Posts: 470

Re: Restart all updated services

Yes thats what we are discussing to restart or to not. In any case daemon-reload is not the solution at all.

Spawned processes via fork() will still be running old binary. And thats what most daemons do. Primary process keeps fork()'ing itself as and when needed.

So in most cases you do need to restart main / primary process which requires systemctl restart.

Last edited by amish (2018-04-03 11:36:55)

Offline

#34 2018-04-03 11:41:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: Restart all updated services

amish wrote:

Yes thats what we are discussing to restart or to not.

No - there are many suggestions here to reboot, not restart services.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#35 2018-04-03 16:45:03

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: Restart all updated services

I'd like to point out that this thread now includes discussion about what actually happens at all wrt. running processes and updated binaries on disk (because it's varying and complicated) - so much for a sane automization of that process...

My ultimate advice is
- To casual users (everybody who can give a shit about 100% update and does not have to worry about a like 20 second -warm- boot process):
* Run updates, if you're concerned because they bring crucial fixes to a daemon: restart the daemon.
** If everything seems to still work, be happy. Ensure the crucial bug has been fixed in the running daemon.
** If not or you don't know how to do that, reboot.
*** If the system doesn't reboot, learn how to update itfp ;-)

- To admins (who masturbate on or get fired w/o 100% update):
* Learn to maintain a productive and a test system and swap one for the other
* If you cannot afford (??) a tandem-system, learn about kexec, live kernel patching and details about how your crucial dameons act. Shrink the system as much as possible (because then you don't have to learn too much)

- To people who know to automagically and savely and robusty update a running system: write a book, get rich (and hated by system admins, who now all will get fired)
(Unit tests on testing systems against productive systems only count if your unit test can also fix what went wrong - in case ;-)

Offline

Board footer

Powered by FluxBB