diff options
author | Pranith K <pranithk@gluster.com> | 2010-09-26 23:55:41 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-27 10:47:34 -0700 |
commit | acd2c4dc93381df9806243b6d367a36301e5eb66 (patch) | |
tree | 8ca1015099993b2df6e1620c46db57881ba7261f /xlators/mgmt/glusterd/src | |
parent | 4725bd37787fe1c02213ab63316abb234077990f (diff) |
mgmt/glusterd: perform post operations of volume set
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1708 (update store, re-compute checksum, restart nfs for volume set)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1708
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index e8aa93b4fa4..91f833cd9a9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -2637,8 +2637,8 @@ glusterd_op_set_volume (gd1_mgmt_stage_op_req *req) sprintf (str, "key%d", count); ret = dict_get_str (dict, str, &key); - - if (ret) + + if (ret) break; sprintf (str, "value%d", count); @@ -2652,7 +2652,7 @@ glusterd_op_set_volume (gd1_mgmt_stage_op_req *req) } ret = set_xlator_option (volinfo->dict, key, value); - + if (ret) { gf_log ("", GF_LOG_ERROR, "Unable to set the options" "in 'volume set'"); @@ -2676,14 +2676,21 @@ glusterd_op_set_volume (gd1_mgmt_stage_op_req *req) goto out; } + ret = glusterd_store_update_volume (volinfo); + if (ret) + goto out; + ret = glusterd_volume_compute_cksum (volinfo); + if (ret) + goto out; - - gf_log ("", GF_LOG_DEBUG, "Received set volume command"); + if (GLUSTERD_STATUS_STARTED == volinfo->status) + ret = glusterd_check_generate_start_nfs (volinfo); ret = 0; out: + gf_log ("", GF_LOG_DEBUG, "returning %d", ret); return ret; } |