Bug 1405238
Summary: | findmnt --target behaviour changed in 7.3, shows all mount-points in chroot | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Ian Wienand <iwienand> | |
Component: | util-linux | Assignee: | Karel Zak <kzak> | |
Status: | CLOSED ERRATA | QA Contact: | Radka Brychtova <rskvaril> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 7.3 | CC: | brad, gpaterno, lyarwood, rskvaril | |
Target Milestone: | rc | Keywords: | Regression, ZStream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1414481 (view as bug list) | Environment: | ||
Last Closed: | 2017-08-01 21:43:41 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: | 1414481 |
Description
Ian Wienand
2016-12-15 23:40:48 UTC
So I guess it must be the patch at [1] Checking /proc/self/mountinfo within the chroot shows the same list as output by the command above. --- bash-4.2# cat /proc/self/mountinfo 45 43 253:17 /image-cache/ccache /tmp/ccache rw,relatime - ext4 /dev/vdb1 rw,data=ordered 46 43 0:3 / /proc rw,relatime - proc none rw 47 43 0:5 / /dev rw,relatime - devtmpfs udev rw,size=4082668k,nr_inodes=1020667,mode=755 48 47 0:12 / /dev/pts rw,nosuid,noexec,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000 49 43 0:15 / /sys rw,relatime - sysfs none rw 50 43 253:17 /image-cache/yum /tmp/yum rw,relatime - ext4 /dev/vdb1 rw,data=ordered --- [1] https://git.centos.org/blob/rpms!util-linux.git/b394b9eae4a21e566f3bd62a559095e09f013f0d/SOURCES!0071-findmnt-don-t-rely-on-st_dev-for-target.patch Sorry, from original comment the dracut loop that has inverted is http://git.kernel.org/cgit/boot/dracut/dracut.git/tree/dracut.sh#n1054 Same here. It SERIOUSLY affects OpenStack nova compute when mounting cinder over NFS. Over nova debug, it findmnt returns 0 even if target is not there. findmnt --target /var/lib/nova/mnt/a972c1ef86f3d8d0143da59338f98ace --source 192.168.10.120:/export/mount/ Seems like a bug, thanks for report. (In reply to Ian Wienand from comment #2) > Sorry, from original comment the dracut loop that has inverted is > > http://git.kernel.org/cgit/boot/dracut/dracut.git/tree/dracut.sh#n1054 BTW, this upstream dracut code seems fragile: for i in /sys /proc /run /dev; do if ! findmnt --target "$i" &>/dev/null; then dwarning "Turning off host-only mode: '$i' is not mounted!" unset hostonly fi done if the goal is to check mountpoint. man findmnt: -T, --target path Define the mount target. If path is not a mountpoint file or directory, then findmnt checks the path elements in reverse order to get the mountpoint (this feature is supported only when searching in kernel files and unsupported for --fstab). It's recommended to use the option --mountpoint when checks of path elements are unwanted and path is a strictly specified mountpoint. It would be better to use findmnt --mountpoint "$i". This option is available since util-linux v2.27. [This comment is not relevant for RHEL7 of course.] 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://access.redhat.com/errata/RHBA-2017:2186 |