1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dmeventd: restart checks for running daemon

Check whether the pid file is associated with running daemon.
If not there is not much point to wait many seconds in loop.
This commit is contained in:
Zdenek Kabelac 2024-04-09 23:29:02 +02:00
parent f27388b5d8
commit f27273e1f0
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.198 -
===================
Restart of dmeventd -R checks pid file to detect running dmeventd first.
Query with dmeventd -i quickly ends when there is no running dmeventd.
Enhance dm_get_status_raid to handle mismatching status or reported legs.
Create /dev/disk/by-label symlinks for DM devs that have crypto as next layer.

View File

@ -2154,6 +2154,11 @@ static void _restart_dmeventd(void)
int version;
const char *e;
if (!dm_daemon_is_running(DMEVENTD_PIDFILE)) {
fprintf(stderr, "WARNING: Coult not find running dmeventd associated with pid file %s.\n", DMEVENTD_PIDFILE);
exit(EXIT_FAILURE);
}
/* Get the list of registrations from the running daemon. */
if (!init_fifos(&fifos)) {
fprintf(stderr, "WARNING: Could not initiate communication with existing dmeventd.\n");