summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-04-21 15:58:34 -0500
committerDavid Teigland <teigland@redhat.com>2016-04-21 15:58:34 -0500
commit4d095c2fbb4383fc4830b9b714f8a7fd45b40fcd (patch)
tree1aeedabe62231f5944b08ad53718e5a98669503b
parent11dd36245450ed664c4a6bd177f17a8077c820a1 (diff)
downloadlvm2-4d095c2fbb4383fc4830b9b714f8a7fd45b40fcd.tar.gz
poll daemon: only call lvmetad_connect when needed
When lvm is not using lvmetad, the lvmetad_connect() in the forked polling process is not needed and was generating unwanted warnings.
-rw-r--r--tools/polldaemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/polldaemon.c b/tools/polldaemon.c
index c2211d734..6b15a0d7e 100644
--- a/tools/polldaemon.c
+++ b/tools/polldaemon.c
@@ -597,7 +597,7 @@ static int _poll_daemon(struct cmd_context *cmd, struct poll_operation_id *id,
/* FIXME Use wait_event (i.e. interval = 0) and */
/* fork one daemon per copy? */
- if (daemon_mode == 1) {
+ if ((daemon_mode == 1) && find_config_tree_bool(cmd, global_use_lvmetad_CFG, NULL)) {
if (!lvmetad_connect(cmd))
log_warn("WARNING: lvm polling process %d cannot connect to lvmetad.", getpid());
}