Description of problem: This used to work: $ sudo mount --bind . /var/lib/mock/fedora-rawhide-x86_64/root/mnt $ mock -r fedora-rawhide-x86_64 shell INFO: mock.py version 1.2.7 starting (python version = 2.7.8)... Start: init plugins INFO: selinux enabled Finish: init plugins Start: run WARNING: Forcibly unmounting '/var/lib/mock/fedora-rawhide-x86_64/root/mnt' from chroot. Start: chroot init INFO: LVM plugin enabled. Allocated pool data: 63.2%. Allocated metadata: 34.63%. INFO: calling preinit hooks INFO: enabled yum cache Start: cleaning yum metadata Finish: cleaning yum metadata INFO: enabled ccache Finish: chroot init Start: shell Now mock unmounts the mount. I know I can specify mount in config file, but I am not going to change config files every time I want to test something. Version-Release number of selected component (if applicable): $ rpm -q mock mock-1.2.7-1.fc21.noarch How reproducible: Always Steps to Reproduce: 1. $ sudo mount --bind . /var/lib/mock/fedora-rawhide-x86_64/root/mnt 2. $ mock -r fedora-rawhide-x86_64 shell 3. Actual results: WARNING: Forcibly unmounting '/var/lib/mock/fedora-rawhide-x86_64/root/mnt' from chroot. Expected results: The mount is kept untouched. Additional info: Also, mock always used to unmount such mount on shell exit, which is wrong as well, not mentioning that bug 1096185 was never resolved and it is still PITA.
How I should find which mount I should unmount and which not? The code which forcibly unmount is there from past to unmount mount from previous run of mock - when mock crashed or was killed. What I can do for you is to implement: --skip-forced-unmount option, which would just unmount mounts, which we believe that mock mounted, and it will skip calling _umount_residual() Do you concur?
Don't touch any mounts you know nothing about at all. You probably know that you are mounting something like /proc, /sys, etc, so unmount this known mount and don't touch others.
This "Feature" has broken composes as the runroot plugin in koji mounts directories outside of mock. mock should not touch any mounts it knows nothing about.
(In reply to Dennis Gilmore from comment #3) Is the Koji configuration static? In that case, you might consider to use some mock plugin: https://fedoraproject.org/wiki/Mock/Plugin/BindMount https://fedoraproject.org/wiki/Mock/Plugin/Mount But anyway, I'd love to see this "feature" removed.
the koji configuration is not static. koji writes out the configs on the fly. in this case we would have to teach the plugin to modify the config and potentially to mount directories outside of the choort and then bind mount into the chroot.
Discussed at 2015-07-13 F23 blocker review meeting: http://meetbot-raw.fedoraproject.org/fedora-blocker-review/2015-07-13/f23-blocker-review.2015-07-13-16.03.log.txt . Accepted as an Alpha blocker per criterion "All release-blocking images must boot in their supported configurations.", on the basis that dgilmore says this bug prevents the compose of one or more release-blocking images (images that don't exist clearly don't boot).
Looking at removing the mount cleanup logic that was added last year. The intent will be that mock will only clean up the mounts it initiates. This means that mounts done in the chroot path will be left alone, *but* if they conflict with mock mounts (e.g. the /proc or /sys mount) the mock run will fail. If you want to change the way mock mounts something you need to do it in the config file.
(In reply to Clark Williams from comment #7) > Looking at removing the mount cleanup logic that was added last year. > > The intent will be that mock will only clean up the mounts it initiates. > This means that mounts done in the chroot path will be left alone, *but* if > they conflict with mock mounts (e.g. the /proc or /sys mount) the mock run > will fail. If you want to change the way mock mounts something you need to > do it in the config file. Sounds like exactly what we need. Thank you
mock-1.2.11-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.11-1.fc21
mock-1.2.11-1.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/mock-1.2.11-1.fc22
mock-1.2.11-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.11-1.el7
mock-1.2.11-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.11-1.el6
Package mock-1.2.11-1.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 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.11-1.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-7301/mock-1.2.11-1.el6 then log in and leave karma (feedback).
mock-1.2.12-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.12-1.fc21
mock-1.2.12-1.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/mock-1.2.12-1.fc22
mock-1.2.12-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.12-1.el6
mock-1.2.12-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.12-1.el7
1.2.12-1 was tagged for f23 before freeze, and composes are happening, so I believe we can drop the blocker status for this.
mock-1.2.12-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.12-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.
mock-1.2.12-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.
mock-1.2.12-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.13-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053
mock-1.2.13-2.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.