Bug 1265811
Summary: | oo-accept-node reports a quota failures when a loop device is used. | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Eric Rich <erich> |
Component: | Containers | Assignee: | Miciah Dashiel Butler Masters <mmasters> |
Status: | CLOSED ERRATA | QA Contact: | Chao Yang <chaoyang> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 2.0.0 | CC: | anli, aos-bugs, jialiu, jokerman, mmccomas, rthrashe, tiwillia |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | openshift-origin-node-util-1.38.6.2-1.el6op | Doc Type: | Bug Fix |
Doc Text: |
Cause:
In order to check that filesystem quotas were enabled, the oo-accept-node tool used the output of the df command to determine the device and mountpoint of the gear base directory. oo-accept-node then specified this mountpoint to the repquota command and expected to see the device in repquota's output. However, if the gear base directory is a loop mount, df prints the loop image filename whereas repquota prints the loop device. Thus oo-accept-node was looking for the wrong string in the repquota output.
Consequence:
If the gear base directory was a loop mount, oo-accept-node printed a spurious error indicating that quotas were disabled for the filesystem even if they were enabled.
Fix:
oo-accept-node now uses the mount command to determine whether the filesystem is a loop mount and, if it is, oo-accept-node now parses the filesystem options to determine the loop device for the filesystem.
In addition, because using a loop mount degrades performance, oo-accept-node will print a warning if the gear base directory is a loop mount.
Result:
oo-accept-node now will print an error only if quotas really are disabled on the filesystem, and oo-accept-node will print a warning if the filesystem is a loop mount.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2016-03-22 16:51:19 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: |
Description
Eric Rich
2015-09-23 20:11:43 UTC
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/afe315643abeb4463ca57e043e1a8037f99b111a oo-accept-node: check_quotas: cope with loop mount Modify oo-accept-node's quota check to check whether the mount is using a loop device mount and, if so, check the quota on the loop device. In addition, print a warning that using a loop mount may impact performance negatively. This commit fixes bug 1265811. https://bugzilla.redhat.com/show_bug.cgi?id=1265811 QE, Can we verify that oo-accept-node will now pass based on the original reproduction steps? # truncate -s 1G /opt/openshift/test.fs # mkfs -t ext4 /opt/openshift/test.fs # mount -oloop,usrquota /opt/openshift/test.fs /var/lib/openshift # oo-accept-node Puddle: http://etherpad.corp.redhat.com/puddle-2-2-2016-02-19 Thank you Reported as 'quotas are not enabled' by oo-accept-node. but step 2)&4) should be quota is turn on. 1) [root@node1 ~]# mount /opt/openshift/test.fs on /var/lib/openshift type ext4 (rw,usrquota,loop=/dev/loop0) 2) [root@node1 ~]# /sbin/quotaon -u -p /var/lib/openshift/ user quota on /var/lib/openshift (/dev/loop0) is on 3) [root@node1 ~]# oo-accept-node WARNING: /var/lib/openshift is a loop mount (loop device: /dev/loop0) ). Using a loop mount may reduce performance. FAIL: quotas are not enabled on /var/lib/openshift (/dev/loop0) ) 1 ERRORS 4) [root@node1 ~]# /sbin/quotaon -u -p /var/lib/openshift/ user quota on /var/lib/openshift (/dev/loop0) is on 5) [root@node1 ~]# rpm -qf /usr/sbin/oo-accept-node openshift-origin-node-util-1.38.6.1-1.el6op.noarch If the mount show loop0 as the suffix as 2), we will hit this issue. 1) /opt/openshift/test.fs on /var/lib/openshift type ext4 (rw,loop=/dev/loop0,usrquota) 2) /opt/openshift/test.fs on /var/lib/openshift type ext4 (rw,usrquota,loop=/dev/loop0) I add one line in /etc/fstab, and run "mount -o remount /var/lib/openshift", and got the message as 2). # tail -1 /etc/fstab /opt/openshift/test.fs /var/lib/openshift ext4 defaults,usrquota 1 0 Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/896aba36d358cda1bd7b1a5d229704d995c72d4d oo-accept-node: check-quotas: fix mnt opts parsing Improve the parsing of mount options from the `mount` command's output by properly splitting on newlines and then removing the parentheses around the mount options. Before this commit, the pattern match `/loop=([^,]+)/` on the mount options was capturing the right parenthesis and newline from the `mount` command's output if the loop option was the last mount option. This commit is related to bug 1265811. https://bugzilla.redhat.com/show_bug.cgi?id=1265811 QE, This should be fixed now. Can we verify with the latest puddle? Thank you. Puddle: http://etherpad.corp.redhat.com/puddle-2-2-2016-02-19 Verified this bug with, and PASS. # truncate -s 1G /opt/openshift/test.fs # mkfs -t ext4 /opt/openshift/test.fs # mount -oloop,usrquota /opt/openshift/test.fs /var/lib/openshift # mount |grep openshift /opt/openshift/test.fs on /var/lib/openshift type ext4 (rw,loop=/dev/loop1,usrquota) # quotaon /var/lib/openshift/ # /sbin/quotaon -u -p /var/lib/openshift/ user quota on /var/lib/openshift (/dev/loop1) is on # oo-accept-node WARNING: /var/lib/openshift is a loop mount (loop device: /dev/loop1). Using a loop mount may reduce performance. PASS # truncate -s 1G /opt/openshift/test.fs # mkfs -t ext4 /opt/openshift/test.fs # mount -oloop,usrquota /opt/openshift/test.fs /var/lib/openshift # mount |grep openshift /opt/openshift/test.fs on /var/lib/openshift type ext4 (rw,loop=/dev/loop1,usrquota) Add one line to /etc/fstab /opt/openshift/test.fs /var/lib/openshift ext4 defaults,usrquota 1 0 # mount -o remount /var/lib/openshift # mount |grep openshift /opt/openshift/test.fs on /var/lib/openshift type ext4 (rw,usrquota,loop=/dev/loop1) # quotaon /var/lib/openshift/ # /sbin/quotaon -u -p /var/lib/openshift/ user quota on /var/lib/openshift (/dev/loop1) is on # oo-accept-node WARNING: /var/lib/openshift is a loop mount (loop device: /dev/loop1). Using a loop mount may reduce performance. PASS Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2016-0489.html |