diff options
author | Anand Avati <avati@gluster.com> | 2010-07-21 07:52:17 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-21 06:34:28 -0700 |
commit | d4a56de8bba96a150a0a59593187a317476a7b80 (patch) | |
tree | 43b5448838ceb23a316e39680f4f2352448c709c /glusterfsd/src/glusterfsd.c | |
parent | 7ad75da5e8cb57336380f688650547275b939c3a (diff) |
glusterfsd: move mgmt_init() to happen post deamonize()
else results in loss of timer thread
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'glusterfsd/src/glusterfsd.c')
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index acd2cb59976..2350b5b059e 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -594,13 +594,16 @@ reincarnate (int signum) { int ret = 0; glusterfs_ctx_t *ctx = NULL; + cmd_args_t *cmd_args = NULL; ctx = glusterfs_ctx_get (); + cmd_args = &ctx->cmd_args; gf_log ("glusterfsd", GF_LOG_NORMAL, "Reloading volfile ..."); - ret = glusterfs_volumes_init (ctx); + if (!cmd_args->volfile_server) + ret = glusterfs_volumes_init (ctx); return; } @@ -861,12 +864,6 @@ parse_cmdline (int argc, char *argv[], glusterfs_ctx_t *ctx) cmd_args->volfile = gf_strdup (DEFAULT_CLIENT_VOLFILE); } - if (cmd_args->volfile_server) { - ret = glusterfs_mgmt_init (ctx); - if (ret) - goto out; - } - if (cmd_args->run_id) { ret = sys_lstat (cmd_args->log_file, &stbuf); /* If its /dev/null, or /dev/stdout, /dev/stderr, @@ -899,7 +896,6 @@ parse_cmdline (int argc, char *argv[], glusterfs_ctx_t *ctx) } } -out: return ret; } @@ -1194,8 +1190,11 @@ glusterfs_volumes_init (glusterfs_ctx_t *ctx) cmd_args = &ctx->cmd_args; - if (cmd_args->volfile_server) - return 0; + if (cmd_args->volfile_server) { + ret = glusterfs_mgmt_init (ctx); + if (ret) + goto out; + } fp = get_volfp (ctx); |