diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2016-10-18 15:16:17 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-11-18 01:56:39 -0800 |
commit | 5310be8838f8db748a698bd3a98f8d00a4114e65 (patch) | |
tree | dcfdf14c322d8731cec0eafc7aa24bf1abbf6629 /xlators/mgmt/glusterd/src | |
parent | 2f70f47979d204d5ee29811f5f5fa61d0a52c3b1 (diff) |
events: Add FMT_WARN for gf_event
Raghavendra G found that posix is trying to print %s
but passing an int when HEALTH_CHECK fails in posix.
These are the kind of bugs that should be caught
at compilation itself.
Also fixed the problematic gf_event() callers.
BUG: 1386097
Change-Id: Id7bd6d9a9690237cec3ca1aefa2aac085e8a1270
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/15671
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-svc-helper.c | 13 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 13 |
2 files changed, 13 insertions, 13 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-svc-helper.c b/xlators/mgmt/glusterd/src/glusterd-svc-helper.c index 72f00922667..70a12dff499 100644 --- a/xlators/mgmt/glusterd/src/glusterd-svc-helper.c +++ b/xlators/mgmt/glusterd/src/glusterd-svc-helper.c @@ -28,16 +28,19 @@ glusterd_svcs_reconfigure () int ret = 0; xlator_t *this = THIS; glusterd_conf_t *conf = NULL; + char *svc_name = NULL; GF_ASSERT (this); conf = this->private; GF_ASSERT (conf); + svc_name = "nfs"; ret = glusterd_nfssvc_reconfigure (); if (ret) goto out; + svc_name = "self-heald"; ret = glusterd_shdsvc_reconfigure (); if (ret) goto out; @@ -45,20 +48,24 @@ glusterd_svcs_reconfigure () if (conf->op_version == GD_OP_VERSION_MIN) goto out; + svc_name = "quotad"; ret = glusterd_quotadsvc_reconfigure (); if (ret) goto out; + svc_name = "bitd"; ret = glusterd_bitdsvc_reconfigure (); if (ret) goto out; + + svc_name = "scrubber"; ret = glusterd_scrubsvc_reconfigure (); if (ret) goto out; out: - if (ret) - gf_event (EVENT_SVC_RECONFIGURE_FAILED, ""); - + if (ret && svc_name) + gf_event (EVENT_SVC_RECONFIGURE_FAILED, "svc_name=%s", + svc_name); return ret; } diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index d916444a9b2..504ffdbe04c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -4383,10 +4383,7 @@ glusterd_compare_friend_data (dict_t *peer_data, int32_t *status, ret = glusterd_import_friend_volumes (peer_data); if (ret) goto out; - - if (glusterd_svcs_manager (NULL)) { - gf_event (EVENT_SVC_MANAGER_FAILED, ""); - } + glusterd_svcs_manager (NULL); } out: @@ -4915,9 +4912,7 @@ glusterd_restart_bricks (glusterd_conf_t *conf) continue; if (start_svcs == _gf_false) { start_svcs = _gf_true; - if (glusterd_svcs_manager (NULL)) { - gf_event (EVENT_SVC_MANAGER_FAILED, ""); - } + glusterd_svcs_manager (NULL); } gf_msg_debug (this->name, 0, "starting the volume %s", volinfo->volname); @@ -4967,9 +4962,7 @@ glusterd_restart_bricks (glusterd_conf_t *conf) } if (start_svcs == _gf_false) { start_svcs = _gf_true; - if (glusterd_svcs_manager (volinfo)) { - gf_event (EVENT_SVC_MANAGER_FAILED, ""); - } + glusterd_svcs_manager (volinfo); } start_svcs = _gf_true; gf_msg_debug (this->name, 0, "starting the snap " |