Bug 1128932

Summary: oo-accept-node quota check fails on xfs
Product: OpenShift Online Reporter: Troy Dawson <tdawson>
Component: ContainersAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: agrimm, bmeng, jokerman, mmccomas
Target Milestone: ---   
Target Release: 2.x   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1131016 (view as bug list) Environment:
Last Closed: 2014-10-03 17:53:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1131016    

Description Troy Dawson 2014-08-11 21:24:05 UTC
Description of problem:
If the user home area is on XFS, the check_quotas section will fail on xfs, even if quotas are on and enforcing.

Version-Release number of selected component (if applicable):
openshift-origin-node-util-1.28.1-1.el6oso

How reproducible:
100%

Steps to Reproduce:
1. Create a node that has the gear home filesystem on XFS
2. oo-accept-node -v
3.

Actual results:
...
INFO: checking filesystem quotas
FAIL: quotas are not enabled on /var/lib/openshift (/dev/mapper/EBSStore01-user_home01)
INFO: checking quota db file selinux label
1 ERRORS
...

Expected results:
...
INFO: checking filesystem quotas
INFO: checking quota db file selinux label
...
Additional info:
We have verified that the quota is enabled for the users by trying to fill up their home area.  They are unable to go past their quota.

Looking at the code in oo-accept-node, it is using the command.
  /sbin/quotaon -u -p <home dev>
EXT4:
# /sbin/quotaon -u -p /dev/EBSStore01/user_home01
user quota on /var/lib/openshift (/dev/mapper/EBSStore01-user_home01) is on
XFS:
# /sbin/quotaon -u -p /dev/EBSStore01/user_home01
user quota on /var/lib/openshift (/dev/mapper/EBSStore01-user_home01) is off

Using that command, it certainly looks like the quota is off.  It might be a bug in the quotaon command.
If we use the repquota command, it seems to work better on XFS.

# repquota  -v /dev/EBSStore01/user_home01
...
*** Status for user quotas on device /dev/mapper/EBSStore01-user_home01
Accounting: ON; Enforcement: ON

I don't currently have the correct solution, I'm just bringing the bug forward.

Comment 1 Rajat Chopra 2014-08-18 17:07:20 UTC
Pull request https://github.com/openshift/origin-server/pull/5718

This fixes oo-accept-node. Not clear yet how the other parts of the quota system will work on XFS.

Comment 2 Meng Bo 2014-08-20 02:21:42 UTC
Move the bug back since the PR in comment#1 has been closed.

Comment 3 Rajat Chopra 2014-08-20 02:54:43 UTC
That got closed by mistake. Its in the merge queue now. Sorry about the noise.

Comment 4 Meng Bo 2014-08-20 11:34:53 UTC
Checked on devenv_5096, with xfs type filesystem mounted to node, and add the GEAR_HOME_DIR as the new mount point.

oo-accept-node will check the filesystem and try to use repquota if it is xfs type.

INFO: checking filesystem quotas
repquota: Mountpoint (or device) /xfs not found or has no quota enabled.
repquota: Not all specified mountpoints are using quota.
FAIL: quotas are not enabled on /xfs (/dev/xvdb1)
INFO: checking 0 user accounts

Comment 5 Troy Dawson 2014-10-03 17:53:10 UTC
Closing.  This was fixed at least with release 2.0.50.