mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
As requested in BZ 454618:
- dmeventd -R will continue to start up even if no dmeventd is currently running + a test for this behaviour - add -R to dmeventd manpage
This commit is contained in:
parent
15b9215534
commit
61394ca4aa
@ -1708,13 +1708,14 @@ static void restart(void)
|
||||
/* Get the list of registrations from the running daemon. */
|
||||
|
||||
if (!init_fifos(&fifos)) {
|
||||
fprintf(stderr, "Could not initiate communication with existing dmeventd.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
fprintf(stderr, "WARNING: Could not initiate communication with existing dmeventd.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (daemon_talk(&fifos, &msg, DM_EVENT_CMD_HELLO, NULL, NULL, 0, 0)) {
|
||||
fprintf(stderr, "Could not communicate with existing dmeventd.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
fprintf(stderr, "WARNING: Could not communicate with existing dmeventd.\n");
|
||||
fini_fifos(&fifos);
|
||||
return;
|
||||
}
|
||||
|
||||
if (daemon_talk(&fifos, &msg, DM_EVENT_CMD_GET_STATUS, "-", "-", 0, 0)) {
|
||||
|
@ -5,6 +5,7 @@ dmeventd \- Device-mapper event daemon
|
||||
.B dmeventd
|
||||
[\-d]
|
||||
[\-f]
|
||||
[\-R]
|
||||
[\-h]
|
||||
[\-V]
|
||||
[\-?]
|
||||
@ -33,6 +34,11 @@ Each extra d adds more debugging information.
|
||||
.I \-f
|
||||
Don't fork, run in the foreground.
|
||||
.TP
|
||||
.I \-R
|
||||
Replace a running dmeventd instance. The running dmeventd must be version
|
||||
2.02.77 or newer. The new dmeventd instance will obtain a list of devices and
|
||||
events to monitor from the currently running daemon.
|
||||
.TP
|
||||
.I \-h, \-?
|
||||
Show help information.
|
||||
.TP
|
||||
|
@ -30,3 +30,11 @@ lvchange --monitor y --verbose $vg/3way 2>&1 | tee lvchange.out
|
||||
grep 'already monitored' lvchange.out
|
||||
lvchange --monitor y --verbose $vg/4way 2>&1 | tee lvchange.out
|
||||
grep 'already monitored' lvchange.out
|
||||
|
||||
# now try what happens if no dmeventd is running
|
||||
kill -9 `cat LOCAL_DMEVENTD`
|
||||
dmeventd -R -f &
|
||||
echo "$!" > LOCAL_DMEVENTD
|
||||
sleep 3
|
||||
lvchange --monitor y --verbose $vg/3way 2>&1 | tee lvchange.out
|
||||
not grep 'already monitored' lvchange.out
|
||||
|
Loading…
Reference in New Issue
Block a user