mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-02 04:22:02 +03:00
lvmetad: check for socket in connect
We can connect if the socket is present, even though the pidfile may not exist, since systemd may start the process when the socket is opened.
This commit is contained in:
4
lib/cache/lvmetad.c
vendored
4
lib/cache/lvmetad.c
vendored
@ -126,8 +126,8 @@ void lvmetad_disconnect(void)
|
||||
|
||||
int lvmetad_connect(struct cmd_context *cmd)
|
||||
{
|
||||
if (access(getenv("LVM_LVMETAD_PIDFILE") ? : LVMETAD_PIDFILE, F_OK)) {
|
||||
log_debug_lvmetad("Failed to connect to lvmetad: not running.");
|
||||
if (!lvmetad_socket_present()) {
|
||||
log_debug_lvmetad("Failed to connect to lvmetad: socket not present.");
|
||||
_lvmetad_connected = 0;
|
||||
_lvmetad_use = 0;
|
||||
_lvmetad_cmd = NULL;
|
||||
|
Reference in New Issue
Block a user