From 4b2cff614462508eef529c5d128e0974720e3f50 Mon Sep 17 00:00:00 2001 From: Manikandan Selvaganesh Date: Tue, 30 Aug 2016 17:53:09 +0530 Subject: glusterd/quota: upgrade quota.conf file during an upgrade Problem ======= When quota is enabled on 3.6, it will have quota conf version in quota.conf as v1.1. This node gets upgraded to 3.7 but it will still have quota conf version as v1.1 until a quota enable/disable/set limit is initiated. When this is not initiated and when this node tries to peer probe a node which is a fresh install of 3.7 (which will have quota conf version as v1.2), then this will result in "Peer rejected" state. This patch fixes the issue. Solution ======== When an upgrade happens from 3.6 to 3.7, quota.conf file needs to be modified as well. With 3.6, in quota.conf the version will be v1.1 and it needs to be changed to v1.2 from 3.7. This is because in 3.7, inode quota feature is introduced. So when an op-version bumpup happens quota.conf needs to be upgraded with quota conf version v1.2 and all the 16 byte uuid needs to be changed to 17 bytes uuid as well. Previously, when the cluster version is upgraded to 3.7, the quota.conf got upgraded as well. But, the upgradation was done only when quota enable/disable/set limit is done. With this patch, the upgradation is done during a cluster op version bump up as well. Change-Id: Idb5ba29d3e1ea0e45c85d87c952c75da9e0f99f0 BUG: 1371539 Signed-off-by: Manikandan Selvaganesh Reviewed-on: http://review.gluster.org/15352 Tested-by: Atin Mukherjee NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Atin Mukherjee --- rpc/xdr/src/cli1-xdr.x | 1 + 1 file changed, 1 insertion(+) (limited to 'rpc/xdr/src/cli1-xdr.x') diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x index 55a9b3de19c..c2d26a9ebcd 100644 --- a/rpc/xdr/src/cli1-xdr.x +++ b/rpc/xdr/src/cli1-xdr.x @@ -94,6 +94,7 @@ enum gf_quota_type { GF_QUOTA_OPTION_TYPE_LIST_OBJECTS, GF_QUOTA_OPTION_TYPE_REMOVE_OBJECTS, GF_QUOTA_OPTION_TYPE_ENABLE_OBJECTS, + GF_QUOTA_OPTION_TYPE_UPGRADE, GF_QUOTA_OPTION_TYPE_MAX }; -- cgit