1
0
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:
David Teigland
2016-04-21 09:27:20 -05:00
parent 0778d2e985
commit d00b70c789

4
lib/cache/lvmetad.c vendored
View File

@ -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;