diff options
author | vmallika <vmallika@redhat.com> | 2015-07-10 13:29:13 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-07-12 23:53:27 -0700 |
commit | 1509f6f2815cb75ecf45abef6d823c8cb30ed47b (patch) | |
tree | 7d64fb190f78dd0eb448498543dfd93be150cd74 /tests | |
parent | 4cd60d5456c2ff0fe0455c8d1d534776bb8269c4 (diff) |
quota/marker: fix spurious failure afr-quota-xattr-mdata-heal.t
This is a backport of http://review.gluster.org/#/c/11583
During quota-update process if inode info is present in size-xattr and
missing in contri-xattrs, then in function '_mq_get_metadata', we set
contri-size as zero (on error -2, which means usage info present, but
inode info missing).
With this we are calculating wrong delta and updating the same.
With this patch we are ignoring errors if inode info in xattrs are
missing
> Change-Id: I7940a0e299b8bb425b5b43746b1f13f775c7fb92
> BUG: 1241153
> Signed-off-by: vmallika <vmallika@redhat.com>
Change-Id: Ie85fa84b5362ae179cc43402bd6a3a6d96a04b81
BUG: 1241831
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/11614
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs/quota/afr-quota-xattr-mdata-heal.t | 3 | ||||
-rw-r--r-- | tests/bugs/quota/inode-quota.t | 14 | ||||
-rw-r--r-- | tests/volume.rc | 18 |
3 files changed, 21 insertions, 14 deletions
diff --git a/tests/bugs/quota/afr-quota-xattr-mdata-heal.t b/tests/bugs/quota/afr-quota-xattr-mdata-heal.t index 486b0382d5d..fc47e2401a2 100644 --- a/tests/bugs/quota/afr-quota-xattr-mdata-heal.t +++ b/tests/bugs/quota/afr-quota-xattr-mdata-heal.t @@ -15,6 +15,9 @@ TEST mkdir $M0/d TEST $CLI volume quota $V0 limit-usage /d 1MB TEST touch $M0/d/a echo abc > $M0/d/a + +EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "512Bytes" quota_usage "/" + #Set the acl xattrs directly on backend, for some reason on mount it gives error acl_access_val="0x0200000001000600ffffffff04000400ffffffff10000400ffffffff20000400ffffffff" acl_file_val="0x0000000400000001ffffffff0006000000000004ffffffff0004000000000010ffffffff0004000000000020ffffffff00040000" diff --git a/tests/bugs/quota/inode-quota.t b/tests/bugs/quota/inode-quota.t index 55a26fa0d2b..1b04f4062fb 100644 --- a/tests/bugs/quota/inode-quota.t +++ b/tests/bugs/quota/inode-quota.t @@ -4,20 +4,6 @@ . $(dirname $0)/../../volume.rc . $(dirname $0)/../../nfs.rc -function quota_list_field () { - local QUOTA_PATH=$1 - local FIELD=$2 - $CLI volume quota $V0 list $QUOTA_PATH | grep $QUOTA_PATH\ - | awk '{print $FIELD}' -} - -function quota_object_list_field () { - local QUOTA_PATH=$1 - local FIELD=$2 - $CLI volume quota $V0 list-objects $QUOTA_PATH | grep $QUOTA_PATH\ - | awk '{print $FIELD}' -} - cleanup; QDD=$(dirname $0)/quota diff --git a/tests/volume.rc b/tests/volume.rc index ec77e602fda..1cb37b81ef6 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -543,3 +543,21 @@ function get_scrubd_count { ps auxww | grep glusterfs | grep scrub.pid | grep -v grep | wc -l } +function quota_list_field () { + local QUOTA_PATH=$1 + local FIELD=$2 + $CLI volume quota $V0 list $QUOTA_PATH | grep $QUOTA_PATH\ + | awk '{print $FIELD}' +} + +function quota_object_list_field () { + local QUOTA_PATH=$1 + local FIELD=$2 + $CLI volume quota $V0 list-objects $QUOTA_PATH | grep $QUOTA_PATH\ + | awk '{print $FIELD}' +} + +function quota_usage() +{ + quota_list_field $1 4 +} |