From 1509f6f2815cb75ecf45abef6d823c8cb30ed47b Mon Sep 17 00:00:00 2001 From: vmallika Date: Fri, 10 Jul 2015 13:29:13 +0530 Subject: 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 Change-Id: Ie85fa84b5362ae179cc43402bd6a3a6d96a04b81 BUG: 1241831 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/11614 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Krishnan Parthasarathi --- tests/volume.rc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/volume.rc') 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 +} -- cgit