Bug 1193487 - root_cache plug-in overwrites root data if the tmpfs plug-in is enabled
Summary: root_cache plug-in overwrites root data if the tmpfs plug-in is enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1190100
TreeView+ depends on / blocked
 
Reported: 2015-02-17 13:01 UTC by Kamil Dudka
Modified: 2015-06-20 21:13 UTC (History)
7 users (show)

Fixed In Version: mock-1.2.10-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1190100
Environment:
Last Closed: 2015-05-01 16:50:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
[PATCH] root_cache: do not assume volatile root with tmpfs (2.35 KB, patch)
2015-02-17 13:02 UTC, Kamil Dudka
kdudka: review?
Details | Diff

Description Kamil Dudka 2015-02-17 13:01:43 UTC
+++ This bug was initially created as a clone of Bug #1190100 +++

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

--- Additional comment from Kamil Dudka on 2015-02-09 18:04:31 CET ---

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 1 Kamil Dudka 2015-02-17 13:02:38 UTC
Created attachment 992657 [details]
[PATCH] root_cache: do not assume volatile root with tmpfs

... if the tmpfs plug-in is configured with keep_mounted = True

Comment 2 Miroslav Suchý 2015-04-22 12:06:09 UTC
Commited (with one correction) as:
* 5dac828  plugin options can be string if specified on command line [RHBZ#1193487]
* cfd014f root_cache: do not assume volatile root with tmpfs [RHBZ#1193487]

Thanks for contribution.

Comment 3 Fedora Update System 2015-04-29 13:16:29 UTC
mock-1.2.8-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc22

Comment 4 Fedora Update System 2015-04-29 13:16:54 UTC
mock-1.2.8-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc21

Comment 5 Fedora Update System 2015-04-29 13:17:46 UTC
mock-1.2.8-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc20

Comment 6 Fedora Update System 2015-04-29 13:18:56 UTC
mock-1.2.8-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.8-1.el7

Comment 7 Fedora Update System 2015-04-29 13:25:46 UTC
mock-1.2.8-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.8-1.el6

Comment 8 Fedora Update System 2015-04-29 19:18:38 UTC
Package mock-1.2.8-1.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.2.8-1.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6057/mock-1.2.8-1.el7
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-05-01 16:50:41 UTC
mock-1.2.8-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-05-02 18:08:20 UTC
mock-1.2.8-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 11 Fedora Update System 2015-05-12 20:46:26 UTC
mock-1.2.8-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 12 Fedora Update System 2015-06-04 11:42:11 UTC
mock-1.2.10-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.10-1.el7

Comment 13 Fedora Update System 2015-06-04 11:42:55 UTC
mock-1.2.10-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.10-1.el6

Comment 14 Fedora Update System 2015-06-20 21:10:35 UTC
mock-1.2.10-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 15 Fedora Update System 2015-06-20 21:13:30 UTC
mock-1.2.10-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.


Note You need to log in before you can comment on or make changes to this bug.