From 425c5acca90bd8c00b94cdcd5082ccc7c1ba078b Mon Sep 17 00:00:00 2001 From: Sunil Kumar Acharya Date: Wed, 5 Jul 2017 16:41:38 +0530 Subject: cluster/ec: Non-disruptive upgrade on EC volume fails Problem: Enabling optimistic changelog on EC volume was not handling node down scenarios appropriately resulting in volume data inaccessibility. Solution: Update dirty xattr appropriately on good bricks whenever nodes are down. This would fix the metadata information as part of heal and thus ensures data accessibility. >BUG: 1468261 >Change-Id: I08b0d28df386d9b2b49c3de84b4aac1c729ac057 >Signed-off-by: Sunil Kumar Acharya >Reviewed-on: https://review.gluster.org/17703 >Smoke: Gluster Build System >CentOS-regression: Gluster Build System >Reviewed-by: Pranith Kumar Karampuri BUG: 1470938 Change-Id: I08b0d28df386d9b2b49c3de84b4aac1c729ac057 Signed-off-by: Sunil Kumar Acharya Reviewed-on: https://review.gluster.org/17773 Smoke: Gluster Build System Reviewed-by: Ashish Pandey Reviewed-by: Pranith Kumar Karampuri CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System --- xlators/cluster/ec/src/ec-common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c index 284c2cd5a62..d3840a9057f 100644 --- a/xlators/cluster/ec/src/ec-common.c +++ b/xlators/cluster/ec/src/ec-common.c @@ -2065,7 +2065,10 @@ ec_update_info(ec_lock_link_t *link) /* If we set the dirty flag for update fop, we have to unset it. * If fop has failed on some bricks, leave the dirty as marked. */ if (lock->unlock_now) { - if (!(ec->node_mask & ~lock->good_mask)) { + /* Ensure that nodes are up while doing final + * metadata update.*/ + if (!(ec->node_mask & ~lock->good_mask) && + !(ec->node_mask & ~ec->xl_up)) { if (ctx->dirty[0] != 0) { dirty[0] = -1; } -- cgit