diff options
author | Max Rijevski <moox@fb.com> | 2017-05-31 16:13:59 -0700 |
---|---|---|
committer | Shreyas Siravara <sshreyas@fb.com> | 2017-09-08 04:42:24 +0000 |
commit | 732544d5b43d1e49299cd359f1754058ec10f5a9 (patch) | |
tree | 752d7321421d6e6f9603039249f5ba10f3ba889a | |
parent | 92ccb288e388fb7fbdb9944999ad20ff7e2f13c3 (diff) |
glusterd: Consider NULL peers to be invalid
Summary:
Null peer UUIDs are assumed to be invalid.
Glusterd should complain and bail if we try to load any on startup.
This is a port of D5160925 to 3.8
Reviewed By: sshreyas
Change-Id: Ib8679c7501a4fc1fbf9b34fdbf47037f38ec7cb8
Reviewed-on: https://review.gluster.org/18238
Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 8cf3b5d38eb..14a00f9605d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -4216,6 +4216,13 @@ glusterd_store_retrieve_peers (xlator_t *this) (void) gf_store_iter_destroy (iter); + if (gf_uuid_is_null (peerinfo->uuid)) { + gf_log ("glusterd", GF_LOG_ERROR, + "Null UUID while attempting to read peer from '%s'", + filepath); + goto out; + } + /* Set first hostname from peerinfo->hostnames to * peerinfo->hostname */ |