summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glusterfsd/src/glusterfsd-messages.h4
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/glusterfsd/src/glusterfsd-messages.h b/glusterfsd/src/glusterfsd-messages.h
index e9c28f71263..e38a88bbd07 100644
--- a/glusterfsd/src/glusterfsd-messages.h
+++ b/glusterfsd/src/glusterfsd-messages.h
@@ -36,7 +36,7 @@
*/
#define GLFS_COMP_BASE GLFS_MSGID_COMP_GLUSTERFSD
-#define GLFS_NUM_MESSAGES 37
+#define GLFS_NUM_MESSAGES 38
#define GLFS_MSGID_END (GLFS_COMP_BASE + GLFS_NUM_MESSAGES + 1)
/* Messaged with message IDs */
#define glfs_msg_start_x GLFS_COMP_BASE, "Invalid: Start of messages"
@@ -109,6 +109,8 @@
#define glusterfsd_msg_36 (GLFS_COMP_BASE + 36), "problem in xlator " \
" loading."
#define glusterfsd_msg_37 (GLFS_COMP_BASE + 37), "failed to get dict value"
+#define glusterfsd_msg_38 (GLFS_COMP_BASE + 38), "Not processing brick-op no."\
+ " %d since volume graph is not yet active."
/*------------*/
#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 5b93d83c572..10ac6bfa6cb 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -736,6 +736,12 @@ glusterfs_handle_translator_op (rpcsvc_request_t *req)
ctx = glusterfsd_ctx;
active = ctx->active;
+ if (!active) {
+ ret = -1;
+ gf_msg (this->name, GF_LOG_ERROR, EAGAIN, glusterfsd_msg_38,
+ xlator_req.op);
+ goto out;
+ }
any = active->first;
input = dict_new ();
ret = dict_unserialize (xlator_req.input.input_val,