Bug 1764129 - quota_fsck script KeyError: 'contri_size'
Summary: quota_fsck script KeyError: 'contri_size'
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: quota
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1786681
TreeView+ depends on / blocked
 
Reported: 2019-10-22 10:01 UTC by hari gowtham
Modified: 2019-12-27 06:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1786681 (view as bug list)
Environment:
Last Closed: 2019-11-06 13:12:14 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 23586 0 None Merged Scripts: quota_fsck script KeyError: 'contri_size' 2019-10-22 23:56:40 UTC
Gluster.org Gerrit 23608 0 None Merged scripts: quota_fsck script TypeError: %d format:not dict 2019-11-06 13:12:13 UTC

Description hari gowtham 2019-10-22 10:01:22 UTC
Description of problem:
When the quota_fsck script is run on a gluster filesystem with mismatch,
it errors out with the followinf errors in a certain scenario.

python quota_fsck.py /bricks/brick4/v > output_brick
getfattr: Removing leading '/' from absolute path names
getfattr: Removing leading '/' from absolute path names
Traceback (most recent call last):
  File "quota_fsck.py", line 374, in <module>
    walktree(brick_path, hard_link_dict)
  File "quota_fsck.py", line 317, in walktree
    verify_file_xattr(pathname, stbuf)
  File "quota_fsck.py", line 236, in verify_file_xattr
    print_msg(QUOTA_SIZE_MISMATCH, path, xattr_dict, stbuf)
  File "quota_fsck.py", line 64, in print_msg
    print('%-24s %-60s %-12i %-12i' % {"Size Mismatch", path, xattr_dict['contri_size'],
KeyError: 'contri_size'
============================

Version-Release number of selected component (if applicable):
mainline on release-7 as well.

How reproducible:


Steps to Reproduce:
1. Create a quota mismatch
2. run the fsck script on the backend
3. it will error out.

Actual results:
python quota_fsck.py /bricks/brick4/v > output_brick
getfattr: Removing leading '/' from absolute path names
getfattr: Removing leading '/' from absolute path names
Traceback (most recent call last):
  File "quota_fsck.py", line 374, in <module>
    walktree(brick_path, hard_link_dict)
  File "quota_fsck.py", line 317, in walktree
    verify_file_xattr(pathname, stbuf)
  File "quota_fsck.py", line 236, in verify_file_xattr
    print_msg(QUOTA_SIZE_MISMATCH, path, xattr_dict, stbuf)
  File "quota_fsck.py", line 64, in print_msg
    print('%-24s %-60s %-12i %-12i' % {"Size Mismatch", path, xattr_dict['contri_size'],
KeyError: 'contri_size'
============================

Expected results:
should not error out.


Additional info:

Comment 1 Worker Ant 2019-10-22 10:06:02 UTC
REVIEW: https://review.gluster.org/23586 (Scripts: quota_fsck script KeyError: 'contri_size') posted (#2) for review on master by hari gowtham

Comment 2 Worker Ant 2019-10-22 23:56:41 UTC
REVIEW: https://review.gluster.org/23586 (Scripts: quota_fsck script KeyError: 'contri_size') merged (#3) on master by Atin Mukherjee

Comment 3 Worker Ant 2019-10-24 12:16:01 UTC
REVIEW: https://review.gluster.org/23608 (scripts: quota_fsck script TypeError: %d format:not dict) posted (#1) for review on master by hari gowtham

Comment 4 Worker Ant 2019-11-06 13:12:14 UTC
REVIEW: https://review.gluster.org/23608 (scripts: quota_fsck script TypeError: %d format:not dict) merged (#2) on master by Amar Tumballi


Note You need to log in before you can comment on or make changes to this bug.