From 5faf4801bd6839cec58324a45dec31f977992236 Mon Sep 17 00:00:00 2001 From: anand Date: Thu, 7 May 2015 12:23:25 +0530 Subject: glusterd: Invoking daemon reconfigure functions correctly Problem : Scrub and bitd reconfigure functions were not invoking if quota is not enabled. Reason : In glusterd_svcs_reconfigure, if quota is not enabled then it is returning in the middle of the function without calling bitd and scrub reconfigure functions. Fix : If quota is not enable on volume, skip quota reconfigure and continue for other daemon reconfigure. This patch also address the state dump issue for bitd and quotad (logs the scrub and bitd info into state dump). Change-Id: I39ea004b70c95543c08496245be595b3ea044a29 BUG: 1219355 Signed-off-by: anand Reviewed-on: http://review.gluster.org/10622 Reviewed-by: Atin Mukherjee Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Kaushal M --- xlators/mgmt/glusterd/src/glusterd-statedump.c | 6 ++++++ xlators/mgmt/glusterd/src/glusterd-svc-helper.c | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'xlators/mgmt/glusterd') diff --git a/xlators/mgmt/glusterd/src/glusterd-statedump.c b/xlators/mgmt/glusterd/src/glusterd-statedump.c index 4792d45571f..24a479e0c35 100644 --- a/xlators/mgmt/glusterd/src/glusterd-statedump.c +++ b/xlators/mgmt/glusterd/src/glusterd-statedump.c @@ -232,6 +232,12 @@ glusterd_dump_priv (xlator_t *this) gf_proc_dump_build_key (key, "glusterd", "quotad.online"); gf_proc_dump_write (key, "%d", priv->quotad_svc.online); + gf_proc_dump_build_key (key, "glusterd", "bitd.online"); + gf_proc_dump_write (key, "%d", priv->bitd_svc.online); + + gf_proc_dump_build_key (key, "glusterd", "scrub.online"); + gf_proc_dump_write (key, "%d", priv->scrub_svc.online); + GLUSTERD_DUMP_PEERS (&priv->peers, uuid_list, _gf_false); glusterd_dump_client_details (priv); glusterd_dict_mgmt_v3_lock_statedump(priv->mgmt_v3_lock); diff --git a/xlators/mgmt/glusterd/src/glusterd-svc-helper.c b/xlators/mgmt/glusterd/src/glusterd-svc-helper.c index 8ee715f1a94..c88b613bddd 100644 --- a/xlators/mgmt/glusterd/src/glusterd-svc-helper.c +++ b/xlators/mgmt/glusterd/src/glusterd-svc-helper.c @@ -46,13 +46,13 @@ glusterd_svcs_reconfigure (glusterd_volinfo_t *volinfo) if (conf->op_version == GD_OP_VERSION_MIN) goto out; - if (volinfo && !glusterd_is_volume_quota_enabled (volinfo)) - goto out; - - ret = glusterd_quotadsvc_reconfigure (); - if (ret) - goto out; - + if (volinfo && !glusterd_is_volume_quota_enabled (volinfo)) { + /*Do nothing */ + } else { + ret = glusterd_quotadsvc_reconfigure (); + if (ret) + goto out; + } ret = glusterd_bitdsvc_reconfigure (); if (ret) goto out; -- cgit