Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 540997
Summary: | Intermittent errors creating mock root cache tarball | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Paul Howarth <paul> | ||||
Component: | mock | Assignee: | Clark Williams <williams> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 12 | CC: | dcantrell, mebrown, williams | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 1.0.1-1.el4 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-12-10 04:18:22 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
Paul Howarth
2009-11-24 17:10:58 UTC
Paul, What do you think of this: index 8756c01..5a83299 100644 --- a/py/mock/plugins/root_cache.py +++ b/py/mock/plugins/root_cache.py @@ -109,11 +109,17 @@ class RootCache(object): # never rebuild cache unless it was a clean build. if self.rootObj.chrootWasCleaned: + mock.util.do(["sync"], shell=False) self.state("creating cache") - mock.util.do( - ["tar"] + self.compressArgs + ["-cf", self.rootCacheFile, - "-C", self.rootObj.makeChrootPath(), "."], - shell=False - ) + try: + mock.util.do( + ["tar"] + self.compressArgs + ["-cf", self.rootCacheFil + "-C", self.rootObj.makeC + "."], + shell=False + ) + except: + os.remove(self.rootCacheFile) + raise finally: self._rootCacheUnlock() except for the stupid line-wrapping, that is :) Intent is to just trap any exception from tar, remove the rootCacheFile and then continue the exception. Suspect I'll need to check for existance of the cache file before calling os.remove() though Created attachment 373528 [details]
Proposed fix for root cache creation problem
Cleaned up version of the above inlined patch
I'll have a crack at it tomorrow. If I comment out the "sync" bit I'm sure I'll be able to provoke a tar failure to test the exception hanbling. Patch works as expected. I commented out the "sync" line to provoke failures and managed to get a couple; in both cases there was no root cache tarball following the failed build. After adding the "sync" line back in, I was unable to provoke any further failures. mock-1.0.1-1.el5 has been submitted as an update for Fedora EPEL 5. http://admin.fedoraproject.org/updates/mock-1.0.1-1.el5 mock-1.0.1-1.el4 has been submitted as an update for Fedora EPEL 4. http://admin.fedoraproject.org/updates/mock-1.0.1-1.el4 mock-1.0.1-1.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/mock-1.0.1-1.fc10 mock-1.0.1-1.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/mock-1.0.1-1.fc12 mock-1.0.1-1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/mock-1.0.1-1.fc11 mock-1.0.1-1.fc10 has been pushed to the Fedora 10 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'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-12225 mock-1.0.1-1.fc11 has been pushed to the Fedora 11 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'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-12296 mock-1.0.1-1.fc12 has been pushed to the Fedora 12 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'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12306 mock-1.0.1-1.el4 has been pushed to the Fedora EPEL 4 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'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/EL-4/FEDORA-EPEL-2009-0909 mock-1.0.1-1.el5 has been pushed to the Fedora EPEL 5 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'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/EL-5/FEDORA-EPEL-2009-0928 mock-1.0.1-1.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report. mock-1.0.1-1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report. mock-1.0.1-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report. mock-1.0.1-1.el4 has been pushed to the Fedora EPEL 4 stable repository. If problems still persist, please make note of it in this bug report. |