Description of problem: When running [0] you fail to properly get the loop device path, and as such you get the following string (output): [root@node2 openshift]# /sbin/quotaon -u -p /opt/openshift/test.fs quotaon: Specified path /opt/openshift/node.ext4 is not directory nor device. quotaon: No correct mountpoint specified. The information used to populate, this output comes from [1] and more or less grabs '/opt/openshift/test.fs' for the oo_mount, However this is not the mount device. The actual device is /dev/loop0. In short grabbing the output shown above results in a "string" miss match and a false positive reporting, from oo-accept-node. You can see from other commands (using the right device) that the correct string is reported. [root@node2 openshift]# /sbin/quotaon -u -p /var/lib/openshift/ user quota on /var/lib/openshift (/dev/loop0) is on Again the issue here seems to be with using the command (below) to get the device (for loop back devices). [root@node2 openshift]# /bin/df -P /var/lib/openshift/ | /usr/bin/tail -1 /opt/openshift/test.fs 999112 2836 943848 1% /var/lib/openshift Version-Release number of selected component (if applicable): 2.0 -> 2.2.6 How reproducible: 100% Steps to Reproduce: # 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 Actual results: FAIL: quotas are not enabled on /var/lib/openshift (/opt/openshift/node.ext4) Expected results: oo-accept-node should pass Additional info: [0] https://github.com/openshift/origin-server/blob/master/node-util/sbin/oo-accept-node#L549-L552 [1] https://github.com/openshift/origin-server/blob/master/node-util/sbin/oo-accept-node#L540-L552
PR: https://github.com/openshift/origin-server/pull/6350
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