Bug 1015072

Summary: Blivet should not mount stuff on its own
Product: Red Hat Enterprise Linux 7 Reporter: Jan Safranek <jsafrane>
Component: python-blivetAssignee: David Lehman <dlehman>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.0CC: jsafrane, pholica, pkotvan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-blivet-0.61.0.5-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 14:05:30 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 Jan Safranek 2013-10-03 12:09:34 UTC
blviet.reset() mounts btrfs filesystems to get list of subvolumes and other info.

In application mode, it must not mount anything anywhere, only when application explicitly asks so. As result, blivet won't list subvolumes of unmounted btrfs volumes, but that's fine.

Comment 2 Jan Safranek 2013-10-03 12:12:23 UTC
As side note, mounting to /tmp is highly unsafe, /var/run/blivet with appropriate SELinux label would be much better if the mounting is absolutely necessary from some technical reason.

Comment 6 Jan Safranek 2015-01-13 15:01:32 UTC
Tested with mkfs.btrfs && strace -f -o trace reproducer.py.

- reproducer.py can be anything that initializes blivet, e.g. the one from bug #1077250
- on RHEL 7.0 (python-blivet-0.18.34-1.el7.noarch), there is in the strace output:
30464 execve("/bin/mount", ["mount", "-t", "btrfs", "-o", "subvolid=5", "/dev/vdb5", "/tmp/btrfs-tmp.12YCS23j"], [/* 29 vars */] <unfinished ...>

- in RHEL 7.1 (python-blivet-0.61.0.20-1.el7.noarch) there is no such exec() in strace -> it looks fixed.

Comment 9 errata-xmlrpc 2015-03-05 14:05:30 UTC
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/RHBA-2015-0313.html