Bug 1190100

Summary: csmock does not work with tmpfs mock plugin
Product: [Fedora] Fedora Reporter: Till Maas <opensource>
Component: csmockAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: kdudka
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: csmock-1.8.1-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1193487 (view as bug list) Environment:
Last Closed: 2015-06-05 23:39:02 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: 1193487    
Bug Blocks:    
Attachments:
Description Flags
final output from csmock with tmpfs enabled in mock none

Description Till Maas 2015-02-06 10:23:17 UTC
Created attachment 988833 [details]
final output from csmock with tmpfs enabled in mock

Description of problem:
It looks like csmock tries to re-use chroots, which does not work with the tmpfs plugin enabled, see the attachment. With the tmpfs plugin disabled, it works better but is obviously slower.

Version-Release number of selected component (if applicable):
csmock-1.6.1-1.fc21

The setting to enable/disable tmpfs is:
config_opts['plugin_conf']['tmpfs_enable'] = True

in /etc/mock/site-defaults.cfg

Comment 1 Kamil Dudka 2015-02-09 17:04:31 UTC
Thank you for reporting the bug!

I am afraid this is by design.  The tmpfs plug-in as it is implemented makes sense mainly for "mock --rebuild".  However, csmock excessively uses "mock --chroot" to run commands inside the chroot.  I would expect the keep_mounted option of the tmpfs plug-in (bug #476837) to make it work, but does not:

$ echo "config_opts['plugin_conf']['tmpfs_opts']['keep_mounted'] = True" \
    | sudo tee -a /etc/mock/fedora-rawhide-x86_64.cfg
config_opts['plugin_conf']['tmpfs_opts']['keep_mounted'] = True

$ mock -r fedora-rawhide-x86_64 --install python 2>/dev/null && mount | grep /var/lib/mock
mock_chroot_tmpfs on /var/lib/mock/fedora-rawhide-x86_64/root type tmpfs (rw,relatime,seclabel,mode=755)

$ mock -r fedora-rawhide-x86_64 --chroot 'rpm -q python' 2>/dev/null
package python is not installed

A possible workaround would be to make csmock explicitly disable the tmpfs plug-in of mock as it did for the selinux plug-in when it was broken (bug #1002142).

Comment 2 Kamil Dudka 2015-04-29 17:21:19 UTC
upstream commit:
https://git.fedorahosted.org/cgit/csmock.git/commit/?id=2046fe57

Note it will work only if bug #1193487 is fixed (or root_cache disabled).

Comment 3 Fedora Update System 2015-05-27 11:34:47 UTC
csmock-1.8.1-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/FEDORA-2015-8984/csmock-1.8.1-1.fc22

Comment 4 Fedora Update System 2015-05-27 11:34:47 UTC
csmock-1.8.1-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6409/csmock-1.8.1-1.el6

Comment 5 Fedora Update System 2015-05-27 11:34:48 UTC
csmock-1.8.1-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6433/csmock-1.8.1-1.el7

Comment 6 Fedora Update System 2015-05-27 11:34:49 UTC
csmock-1.8.1-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/FEDORA-2015-8837/csmock-1.8.1-1.fc21

Comment 7 Fedora Update System 2015-05-27 11:35:56 UTC
csmock-1.8.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2015-8866/csmock-1.8.1-1.fc20

Comment 8 Fedora Update System 2015-05-27 16:03:32 UTC
Package csmock-1.8.1-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing csmock-1.8.1-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-8837/csmock-1.8.1-1.fc21
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-06-05 23:39:02 UTC
csmock-1.8.1-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2015-06-05 23:56:01 UTC
csmock-1.8.1-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2015-06-06 00:06:09 UTC
csmock-1.8.1-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2015-06-10 19:16:48 UTC
csmock-1.8.1-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2015-06-10 19:17:02 UTC
csmock-1.8.1-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.