diff options
author | Ravishankar N <ravishankar@redhat.com> | 2015-12-21 10:09:53 +0000 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-12-28 23:26:57 -0800 |
commit | 101243860bca1bbda8a03ab76f6753ecc10799ed (patch) | |
tree | a2d4828eb25d2945f1c6c59aa39fe0644ac87ed5 /xlators/cluster/afr/src/afr.c | |
parent | f88369e75fc2482eec68da798d849acaa30c5de8 (diff) |
afr: warn if pending xattrs missing during init()
Backport of http://review.gluster.org/#/c/13038/
Since commit 6e635284a4411b816d4d860a28262c9e6dc4bd6a
(glusterfs-3.7.7), the afr pending xattrs are stored in the volfile and used
by afr when it initializes. If a cluster is upgraded, prevent afr from loading
until the op-version has been bumped up to 3.7.7 and the volfiles have been
regenerated using a volume set command.
Without this fix, AFR will crash when initialzing.
Change-Id: I14249dedb3f2f77cd754d78d8a9a70fdc5fc8c10
BUG: 1293536
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
(cherry picked from commit 4bfbabfdd698e93a1dc1aad5590ed18f10936c55)
Reviewed-on: http://review.gluster.org/13058
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.c')
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index 4c072b6c69f..34de74da977 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -411,6 +411,13 @@ init (xlator_t *this) ret = -ENOMEM; goto out; } + if (!xattrs_list) { + ret = -EINVAL; + gf_msg (this->name, GF_LOG_ERROR, -ret, AFR_MSG_NO_CHANGELOG, + "Unable to fetch afr pending changelogs. Is op-version" + " >= 30707?"); + goto out; + } ptr = gf_strdup (xattrs_list); if (!ptr) { ret = -ENOMEM; |