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
systemd: add resource-agents-deps target #974
Conversation
After= and Wants= will be added to pacemaker.service. |
@@ -426,6 +426,18 @@ LVM_start() { | |||
local vg=$1 | |||
local clvmd=0 | |||
|
|||
# systemd drop-in to stop process before storage services during | |||
# shutdown/reboot | |||
if ps -p 1 | grep -q systemd ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like something we want a function for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the man page of sd_booted()
:
Internally, this function checks whether the directory /run/systemd/system/ exists. A simple check like this can also be implemented trivially in shell or any other language.
On Wed, May 03, 2017 at 09:32:36PM -0700, Andrew Beekhof wrote:
> @@ -426,6 +426,18 @@ LVM_start() {
local vg=$1
local clvmd=0
+ # systemd drop-in to stop process before storage services during
+ # shutdown/reboot
+ if ps -p 1 | grep -q systemd ; then
Looks like something we want a function for.
IIRC, there's also a bunch of related tests in nfsserver. Best to
be done by somebody who's running systemd (I don't).
|
6dd980d
to
89af981
Compare
He meant the drop-in, so I have now made a systemd_drop_in function that is being used by the 2 agents. |
Not sure what does "drop-in" mean. At any rate, what I meant is a function to test whether the system is running systemd. In nfsserver there's a test for systemctl existence which is not unequivocal (i.e. if systemctl exists doesn't necessarily mean that systemd is used to manage services).
|
drop-in is a systemd "override" file that can add After= or similar dependencies. |
clvmd and LVM will create drop-ins on start to avoid nodes being fence during shutdown or reboot.