glusterfsd: Do not process GLUSTERD_NODE_STATUS if graph is not ready
Otherwise, gnfs will crash if we try to get nfs clients status in following situation. Also see commit 2f9e555f. Reproducible Steps: 1. systemctl restart glusterd; gluster volume status rep 2. systemctl restart glusterd; gluster volume status rep nfs clients step 1 works ok, but step 2 will lead localhost gnfs crash with certain probability. /lib64/libglusterfs.so.0(+0x270f0)[0x7effb6c7b0f0] /lib64/libglusterfs.so.0(gf_print_trace+0x334)[0x7effb6c854a4] /lib64/libc.so.6(+0x35270)[0x7effb52e7270] /usr/sbin/glusterfs(glusterfs_handle_node_status+0x155)[0x7effb7196905] /lib64/libglusterfs.so.0(+0x63f40)[0x7effb6cb7f40] /lib64/libc.so.6(+0x46d40)[0x7effb52f8d40] Updates: bz#1646869 Change-Id: Ia4cb009f821d32b2d18ba48d3467cc81a4b07747 Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com> Signed-off-by: Hu Jianfei <hujianfei@cmss.chinamobile.com>
This commit is contained in:
parent
d945c44c62
commit
ee630e250f
@ -1312,6 +1312,11 @@ glusterfs_handle_node_status(rpcsvc_request_t *req)
|
||||
ctx = glusterfsd_ctx;
|
||||
GF_ASSERT(ctx);
|
||||
active = ctx->active;
|
||||
if (active == NULL) {
|
||||
gf_log(THIS->name, GF_LOG_ERROR, "ctx->active returned NULL");
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
any = active->first;
|
||||
|
||||
if ((cmd & GF_CLI_STATUS_NFS) != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user