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