Bug 916933 - RFE: rpm spec macro for services that should not be running during update
Summary: RFE: rpm spec macro for services that should not be running during update
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: systemd-RFE
TreeView+ depends on / blocked
 
Reported: 2013-03-01 09:41 UTC by Michal Hlavinka
Modified: 2021-12-14 17:01 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-12-14 17:01:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michal Hlavinka 2013-03-01 09:41:18 UTC
Description of problem:
There are a few systemd macros for %pre/%post/... phases of rpm package update.
Services are restarted once updated is complete.
Some services does not work properly and/or spawn error messages if they are running during update. For this case, it'd help if you could add another set of systemd macros that would stop service before update and start it again once update is complete.

Comment 1 Michal Schmidt 2013-03-01 11:14:17 UTC
Would you give us a couple of examples of packages whose scriptlets do this?

Comment 2 Michal Hlavinka 2013-03-01 11:34:30 UTC
One example is dovecot. It has master process spawning workers and has dlopen-ed plugins. Bug #134325. Fix was removed during one spec file clean-up and I got email that it caused problems again, so I put it back.

Second package is nut which also has several workers communicating together. This package does not have fix for this yet. I filed this bug before fixing it.

Comment 3 Bill Nottingham 2013-03-01 16:15:28 UTC
If a package can't be restarted cleanly via normal methods in a transaction, perhaps it shouldn't be restarted at all and be left to the administrator?

Comment 4 Michal Hlavinka 2013-03-04 09:37:04 UTC
The problem is not time of the restart, the problem is that some services should not be running with half new, half old files. Master process spawns workers (and communicates with them) and workers dlopen plugins. If old master spawns new worker, it can cause a problem. If old worker tries to dlopen new plugin, it can cause a problem.

Comment 5 Zbigniew Jędrzejewski-Szmek 2021-12-14 17:01:31 UTC
I don't think we want to handle this in systemd macros. Programs generally need to deal with
files being upgraded in place… In cases where this is not possible, the solution will be specific
to the program at hand. Trying to come up with something generic would be a lot of effort that
likely wouldn't turn out to be very useful anyway.


Note You need to log in before you can comment on or make changes to this bug.