summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd.c16
-rw-r--r--glusterfsd/src/glusterfsd.h4
2 files changed, 14 insertions, 6 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 7c818028062..2a542f63c60 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -669,14 +669,24 @@ reincarnate (int signum)
ctx = glusterfs_ctx_get ();
cmd_args = &ctx->cmd_args;
- gf_log ("glusterfsd", GF_LOG_NORMAL,
- "Reloading volfile ...");
- if (!cmd_args->volfile_server)
+ if (cmd_args->volfile_server) {
+ gf_log ("glusterfsd", GF_LOG_NORMAL,
+ "Fetching the volume file from server...");
+ ret = glusterfs_volfile_fetch (ctx);
+ } else {
+ gf_log ("glusterfsd", GF_LOG_NORMAL,
+ "Reloading volfile ...");
ret = glusterfs_volumes_init (ctx);
+ }
+
if (ret < 0)
gf_log ("glusterfsd", GF_LOG_ERROR,
"volume initialization failed.");
+
+ /* Also, SIGHUP should do logroate */
+ gf_log_logrotate (1);
+
return;
}
diff --git a/glusterfsd/src/glusterfsd.h b/glusterfsd/src/glusterfsd.h
index a082b0e4b7f..c0789b6d202 100644
--- a/glusterfsd/src/glusterfsd.h
+++ b/glusterfsd/src/glusterfsd.h
@@ -77,11 +77,9 @@ enum argp_option_keys {
ARGP_BRICK_PORT_KEY = 152,
};
-/* Moved here from fetch-spec.h */
-FILE *fetch_spec (glusterfs_ctx_t *ctx);
-
int glusterfs_mgmt_pmap_signout (glusterfs_ctx_t *ctx);
int glusterfs_mgmt_pmap_signin (glusterfs_ctx_t *ctx);
+int glusterfs_volfile_fetch (glusterfs_ctx_t *ctx);
#endif /* __GLUSTERFSD_H__ */