|
|
74b1de |
From bd087c3d2766b81b25ea7bbe425b55023fd12545 Mon Sep 17 00:00:00 2001
|
|
|
74b1de |
From: Sanju Rakonde <srakonde@redhat.com>
|
|
|
74b1de |
Date: Wed, 15 May 2019 07:35:45 +0530
|
|
|
74b1de |
Subject: [PATCH 159/169] glusterd: add an op-version check
|
|
|
74b1de |
|
|
|
74b1de |
Problem: "gluster v status" is hung in heterogenous cluster
|
|
|
74b1de |
when issued from a non-upgraded node.
|
|
|
74b1de |
|
|
|
74b1de |
Cause: commit 34e010d64 fixes the txn-opinfo mem leak
|
|
|
74b1de |
in op-sm framework by not setting the txn-opinfo if some
|
|
|
74b1de |
conditions are true. When vol status is issued from a
|
|
|
74b1de |
non-upgraded node, command is hanging in its upgraded peer
|
|
|
74b1de |
as the upgraded node setting the txn-opinfo based on new
|
|
|
74b1de |
conditions where as non-upgraded nodes are following diff
|
|
|
74b1de |
conditions.
|
|
|
74b1de |
|
|
|
74b1de |
Fix: Add an op-version check, so that all the nodes follow
|
|
|
74b1de |
same set of conditions to set txn-opinfo.
|
|
|
74b1de |
|
|
|
74b1de |
upstream patch: https://review.gluster.org/#/c/glusterfs/+/22730/
|
|
|
74b1de |
|
|
|
74b1de |
BUG: 1707246
|
|
|
74b1de |
|
|
|
74b1de |
> fixes: bz#1710159
|
|
|
74b1de |
> Change-Id: Ie1f353212c5931ddd1b728d2e6949dfe6225c4ab
|
|
|
74b1de |
> Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
74b1de |
|
|
|
74b1de |
Change-Id: Ie1f353212c5931ddd1b728d2e6949dfe6225c4ab
|
|
|
74b1de |
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
74b1de |
Reviewed-on: https://code.engineering.redhat.com/gerrit/172307
|
|
|
74b1de |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
74b1de |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
74b1de |
---
|
|
|
74b1de |
xlators/mgmt/glusterd/src/glusterd-op-sm.c | 6 +++++-
|
|
|
74b1de |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
74b1de |
|
|
|
74b1de |
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
74b1de |
index 94a5e1f..d0c1a2c 100644
|
|
|
74b1de |
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
74b1de |
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
|
|
|
74b1de |
@@ -8158,9 +8158,12 @@ glusterd_op_sm()
|
|
|
74b1de |
glusterd_op_sm_event_type_t event_type = GD_OP_EVENT_NONE;
|
|
|
74b1de |
xlator_t *this = NULL;
|
|
|
74b1de |
glusterd_op_info_t txn_op_info;
|
|
|
74b1de |
+ glusterd_conf_t *priv = NULL;
|
|
|
74b1de |
|
|
|
74b1de |
this = THIS;
|
|
|
74b1de |
GF_ASSERT(this);
|
|
|
74b1de |
+ priv = this->private;
|
|
|
74b1de |
+ GF_ASSERT(priv);
|
|
|
74b1de |
|
|
|
74b1de |
ret = synclock_trylock(&gd_op_sm_lock);
|
|
|
74b1de |
if (ret) {
|
|
|
74b1de |
@@ -8238,7 +8241,8 @@ glusterd_op_sm()
|
|
|
74b1de |
"Unable to clear "
|
|
|
74b1de |
"transaction's opinfo");
|
|
|
74b1de |
} else {
|
|
|
74b1de |
- if (!(event_type == GD_OP_EVENT_STAGE_OP &&
|
|
|
74b1de |
+ if ((priv->op_version < GD_OP_VERSION_6_0) ||
|
|
|
74b1de |
+ !(event_type == GD_OP_EVENT_STAGE_OP &&
|
|
|
74b1de |
opinfo.state.state == GD_OP_STATE_STAGED &&
|
|
|
74b1de |
opinfo.skip_locking)) {
|
|
|
74b1de |
ret = glusterd_set_txn_opinfo(&event->txn_id, &opinfo);
|
|
|
74b1de |
--
|
|
|
74b1de |
1.8.3.1
|
|
|
74b1de |
|