diff options
| author | Atin Mukherjee <amukherj@redhat.com> | 2016-11-22 19:04:54 +0530 |
|---|---|---|
| committer | Atin Mukherjee <amukherj@redhat.com> | 2016-11-23 04:51:06 -0800 |
| commit | 4c371c2ecd432c9d6d60492bc469cf52c9bc4a96 (patch) | |
| tree | 2427a0c2a1b51b181a936f3ea3cb2e1746b5263b /xlators/mgmt/glusterd/src/glusterd-utils.c | |
| parent | 4f4229c7f76d372373c78e9b762ad6abe3a6bdc6 (diff) | |
glusterd: fix few events generation
This patch does the following:
1. Generate PEER_REJECT event if the peer add request is from an unknown peer
during peer handshaking.
2. EVENT_COMPARE_FRIEND_VOLUME_FAILED should be generated based on status code,
not ret.
3. Add EVENT_BRICKPATH_RESOLVE_FAILED event in case glusterd fails to resolve
bricks, this is mainly at restore path.
4. Remove EVENT_BRICKS_START_FAILED event as we already have
EVENT_BRICK_START_FAILED
>Reviewed-on: http://review.gluster.org/15903
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: Samikshan Bairagya <samikshan@gmail.com>
Change-Id: I90e5bc4a331166d0bb3554eb2ec9df2526837a1d
BUG: 1397705
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/15912
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Samikshan Bairagya <samikshan@gmail.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 6f332de556e..9e4419c7247 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -2998,7 +2998,7 @@ glusterd_compare_friend_volume (dict_t *peer_data, int32_t count, *status = GLUSTERD_VOL_COMP_SCS; out: - if (ret) { + if (*status == GLUSTERD_VOL_COMP_RJT) { gf_event (EVENT_COMPARE_FRIEND_VOLUME_FAILED, "volume=%s", volinfo->volname); } @@ -4144,10 +4144,7 @@ glusterd_import_friend_volume (dict_t *peer_data, size_t count) } if (glusterd_is_volume_started (new_volinfo)) { - if (glusterd_start_bricks (new_volinfo)) { - gf_event (EVENT_BRICKS_START_FAILED, "volume=%s", - new_volinfo->volname); - } + (void) glusterd_start_bricks (new_volinfo); if (glusterd_is_snapd_enabled (new_volinfo)) { svc = &(new_volinfo->snapd.svc); if (svc->manager (svc, new_volinfo, @@ -5922,6 +5919,10 @@ glusterd_brick_stop (glusterd_volinfo_t *volinfo, if (gf_uuid_is_null (brickinfo->uuid)) { ret = glusterd_resolve_brick (brickinfo); if (ret) { + gf_event (EVENT_BRICKPATH_RESOLVE_FAILED, + "peer=%s;volume=%s;brick=%s", + brickinfo->hostname, volinfo->volname, + brickinfo->path); gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_RESOLVE_BRICK_FAIL, FMTSTR_RESOLVE_BRICK, brickinfo->hostname, brickinfo->path); |
