diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2014-02-17 16:25:32 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2014-02-17 16:29:49 +0100 |
commit | f33a224ef016f2071d7f0f6fdacfe56d98c3c58a (patch) | |
tree | a745d35970bf48acd2abb81b2cac660f66ec1144 /scripts | |
parent | 6e2f70623351fe5de0e8179d377578a08b0a3625 (diff) | |
download | lvm2-f33a224ef016f2071d7f0f6fdacfe56d98c3c58a.tar.gz |
scripts: use --ignoreskippedcluster in lvm2-monitor initscript/systemd unit
When clustered VG is available in the system but we don't have
clustering set up for whatever reason, the lvm2-monitor scripts should
not fail completely just because these clustered VGs are skipped during
vgs/vgchange calls in lvm2-monitor initscript/systemd unit.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lvm2_monitoring_init_red_hat.in | 8 | ||||
-rw-r--r-- | scripts/lvm2_monitoring_systemd_red_hat.service.in | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/scripts/lvm2_monitoring_init_red_hat.in b/scripts/lvm2_monitoring_init_red_hat.in index cae652c90..44de07f1b 100644 --- a/scripts/lvm2_monitoring_init_red_hat.in +++ b/scripts/lvm2_monitoring_init_red_hat.in @@ -48,10 +48,10 @@ start() { ret=0 # TODO do we want to separate out already active groups only? - VGSLIST=`$VGS --noheadings -o name --config 'log{command_names=0 prefix=" "}' 2> /dev/null` + VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null` for vg in $VGSLIST do - action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y --poll y --config 'log{command_names=0 prefix=" "}' $vg || ret=$? + action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$? done return $ret @@ -66,10 +66,10 @@ stop() echo "Not stopping monitoring, this is a dangerous operation. Please use force-stop to override." return 1 fi - VGSLIST=`$VGS --noheadings -o name --config 'log{command_names=0 prefix=" "}' 2> /dev/null` + VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null` for vg in $VGSLIST do - action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n --config 'log{command_names=0 prefix=" "}' $vg || ret=$? + action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$? done return $ret } diff --git a/scripts/lvm2_monitoring_systemd_red_hat.service.in b/scripts/lvm2_monitoring_systemd_red_hat.service.in index 670d0c48a..05f911b1d 100644 --- a/scripts/lvm2_monitoring_systemd_red_hat.service.in +++ b/scripts/lvm2_monitoring_systemd_red_hat.service.in @@ -10,9 +10,9 @@ Conflicts=shutdown.target [Service] Type=oneshot Environment=LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1 -ExecStart=@sbindir@/lvm vgchange --monitor y +ExecStart=@sbindir@/lvm vgchange --monitor y --ignoreskippedcluster # The lvmetad must be disabled here, it needs https://bugzilla.redhat.com/show_bug.cgi?id=843587 to be resolved first. -ExecStop=@sbindir@/lvm vgchange --monitor n --config 'global{use_lvmetad=0}' +ExecStop=@sbindir@/lvm vgchange --monitor n --config 'global{use_lvmetad=0}' --ignoreskippedcluster RemainAfterExit=yes [Install] |