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

toollib: close connection to lvmetad after fork

sharing connection between parent command and background
processes spawned from parent could lead to occasional failures
due to unexpected corruption in daemon responses sent to either child
or a parent.

lvmetad issued warning about duplicate config values in request.
LVM commands occasionaly failed w/ internal error after receving
corrupted response.

lvmetad connection is renewed when needed after explicit disconnect
in child
This commit is contained in:
Ondrej Kozina 2015-04-13 16:29:15 +02:00
parent c26d81d6e6
commit fe30658a4d

View File

@ -97,6 +97,8 @@ int become_daemon(struct cmd_context *cmd, int skip_lvm)
strncpy(*cmd->argv, "(lvm2)", strlen(*cmd->argv));
lvmetad_disconnect();
if (!skip_lvm) {
reset_locking();
lvmcache_destroy(cmd, 1, 1);