|
|
12a457 |
From 1847ef315cf4bb47de13c2a30cb32b9cae64c613 Mon Sep 17 00:00:00 2001
|
|
|
12a457 |
From: anand <anekkunt@redhat.com>
|
|
|
12a457 |
Date: Wed, 18 Nov 2015 16:13:46 +0530
|
|
|
12a457 |
Subject: [PATCH 25/26] glusterd: fix info file checksum mismatch during upgrade
|
|
|
12a457 |
|
|
|
12a457 |
peers are moving rejected state when upgrading from RHS2.1 to RHGS3.1.2 due to checksum
|
|
|
12a457 |
mismatch.
|
|
|
12a457 |
|
|
|
12a457 |
Label: DOWNSTREAM ONLY
|
|
|
12a457 |
|
|
|
12a457 |
Change-Id: Ifea6b7dfe8477c7f17eefc5ca87ced58aaa21c84
|
|
|
12a457 |
BUG: 1283035
|
|
|
12a457 |
Signed-off-by: anand <anekkunt@redhat.com>
|
|
|
12a457 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/61774
|
|
|
12a457 |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
12a457 |
Tested-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
12a457 |
---
|
|
|
12a457 |
xlators/mgmt/glusterd/src/glusterd-store.c | 21 ++++++++++++---------
|
|
|
12a457 |
1 files changed, 12 insertions(+), 9 deletions(-)
|
|
|
12a457 |
|
|
|
12a457 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
|
|
|
12a457 |
index ef12d42..9a2420f 100644
|
|
|
12a457 |
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
|
|
|
12a457 |
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
|
|
|
12a457 |
@@ -1005,16 +1005,19 @@ glusterd_volume_exclude_options_write (int fd, glusterd_volinfo_t *volinfo)
|
|
|
12a457 |
goto out;
|
|
|
12a457 |
}
|
|
|
12a457 |
|
|
|
12a457 |
- snprintf (buf, sizeof (buf), "%d", volinfo->op_version);
|
|
|
12a457 |
- ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_VOL_OP_VERSION, buf);
|
|
|
12a457 |
- if (ret)
|
|
|
12a457 |
- goto out;
|
|
|
12a457 |
+ if (conf->op_version >= GD_OP_VERSION_RHS_3_0) {
|
|
|
12a457 |
+ snprintf (buf, sizeof (buf), "%d", volinfo->op_version);
|
|
|
12a457 |
+ ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_VOL_OP_VERSION, buf);
|
|
|
12a457 |
+ if (ret)
|
|
|
12a457 |
+ goto out;
|
|
|
12a457 |
+
|
|
|
12a457 |
+ snprintf (buf, sizeof (buf), "%d", volinfo->client_op_version);
|
|
|
12a457 |
+ ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_VOL_CLIENT_OP_VERSION,
|
|
|
12a457 |
+ buf);
|
|
|
12a457 |
+ if (ret)
|
|
|
12a457 |
+ goto out;
|
|
|
12a457 |
+ }
|
|
|
12a457 |
|
|
|
12a457 |
- snprintf (buf, sizeof (buf), "%d", volinfo->client_op_version);
|
|
|
12a457 |
- ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_VOL_CLIENT_OP_VERSION,
|
|
|
12a457 |
- buf);
|
|
|
12a457 |
- if (ret)
|
|
|
12a457 |
- goto out;
|
|
|
12a457 |
if (volinfo->caps) {
|
|
|
12a457 |
snprintf (buf, sizeof (buf), "%d", volinfo->caps);
|
|
|
12a457 |
ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_VOL_CAPS,
|
|
|
12a457 |
--
|
|
|
12a457 |
1.7.1
|
|
|
12a457 |
|