summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glusterfsd/src/glusterfsd-messages.h3
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/glusterfsd/src/glusterfsd-messages.h b/glusterfsd/src/glusterfsd-messages.h
index 8df32a33179..95fc79ef8d0 100644
--- a/glusterfsd/src/glusterfsd-messages.h
+++ b/glusterfsd/src/glusterfsd-messages.h
@@ -60,7 +60,8 @@ GLFS_MSGID(GLUSTERFSD,
glusterfsd_msg_34,
glusterfsd_msg_35,
glusterfsd_msg_36,
- glusterfsd_msg_37
+ glusterfsd_msg_37,
+ glusterfsd_msg_38
);
#endif /* !_GLUSTERFSD_MESSAGES_H_ */
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 91c75069627..32954c901e6 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -673,6 +673,13 @@ 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,
+ "Not processing brick-op no. %d since volume graph is "
+ "not yet active.", xlator_req.op);
+ goto out;
+ }
any = active->first;
input = dict_new ();
ret = dict_unserialize (xlator_req.input.input_val,