Bug 250985
| Summary: | mock doesn't umount /dev/ in case of critical error | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jindrich Novy <jnovy> | ||||||
| Component: | mock | Assignee: | Dave Cantrell <dcantrell> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | low | ||||||||
| Version: | 7 | CC: | bugs.michael, derks, jos, mebrown, mlichvar, pknirsch, pmachata, tjanouse, williams | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | 0.8.4-2.fc7 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2007-10-29 19:05:39 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Jindrich Novy
2007-08-06 10:56:50 UTC
I think this happens when you run mock build while being in mock shell as well. I just experienced it on EL5 with fc6 mock rpm -- so if you fix it, please update this as well. Created attachment 216311 [details]
Patch to umount '/dev' during clean()
As the patch above explains, '/dev' is never umounted in the 'def clean()' method. Therefore, if '/dev' was never umounted in a previous build, the next one would rm -rf it. Testing with the patch above applied avoid '/dev' from being wiped out. fixed in mock 0.8.0+ mock-0.8.4-2.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update mock' mock-0.8.4-2.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report. mock-0.8.4-2.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update mock' mock-0.8.4-2.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report. Fedora 6 is affected by this, too. $ rpm -q mock mock-0.7.2-1.fc6.1 I have tagged mock-0.7.7 in the git repo with fixes for this. Since FC6 is almost frozen, I had not planned on pushing this update. If Jesse and Clark agree, we could possibly push it before FC6 freezes completely. Please test 0.7.7 from git to see that it fixes your issue. I have checked 0.7.7 into FC6 tree and run 'make tag', but I have not run a build yet. Can you please test 0.7.7 before I push it? Doesn't work. (I've got mock-0.7.7 from http://linux.dell.com/git/mock.git too). As I see it, this clean() function is called pretty much at the beginning, even before prep(). It simply cannot work when --uniqueext is set, which is the case with a buildsys like Plague. "plague-client kill ..." makes it worse, it seems, as I see multiple mock/mock-yum related processes here still after the "mock clean". For manual mock builds it works. In Plague I've modified the kill handler to wait for the mock process group and not just for the mock child before running mock clean. I find it strange that it kills the mock process group, but waits for just the child. So far, waiting for the entire group works for me fine. Ah! Found the remaining problem: $ /usr/bin/setarch i686 /usr/bin/mock clean --uniqueext=e6132b04344468297335b1f64f8530c0065a584f -r fedora-8-i386-build Could not create dir /var/lib/mock/fedora-8-i386-e6132b04344468297335b1f64f8530c0065a584f/state. Error: [Errno 28] No space left on device: '/var/lib/mock/fedora-8-i386-e6132b04344468297335b1f64f8530c0065a584f/state' So, in Jindrich's original bug report, in the out-of-disk-space condition, also a "mock clean" doesn't umount the bind mounts because it terminates too early. FC6 is locked for updates in early Dec. If you would like to submit patches, I would happily accept them into a 0.7.x update as long as they make the freeze deadline and Jesse and Clark give an ok. Created attachment 260531 [details]
umount early in mock-0.7.7
Here's one way to fix it. In "clean" run-mode, unmount as soon as
the config rootdir has been determined.
|