Bug 1101402

Summary: if createrepo fails Beaker should do its best to clean things up
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: generalAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.16CC: aigao, asaha, dcallagh, drohwer, jhutar, rmancy, xma
Target Milestone: 0.17   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-10 23:28:23 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:

Description Dan Callaghan 2014-05-27 06:45:29 UTC
While it's running createrepo (and createrepo_c) create various temp files and directories. They are supposed to clean up after themselves, even if an error occurs, but certain kinds of failures may prevent them from doing so (for example being killed with an unhandled signal).

If a createrepo child process fails, Beaker should make an effort to clean up any temporary files/directories so that the system is not left in a state where new createrepo processes refuse to run (and thus Beaker cannot accept new task uploads).

Comment 1 Dan Callaghan 2014-05-27 06:46:15 UTC
Most important one is the /var/www/beaker/rpms/.repodata directory which is created by createrepo_c. We should check for other temp files/directories, and also check what naming scheme createrepo uses as well.

Comment 4 Dan Callaghan 2014-06-02 00:57:00 UTC
I still haven't figured out what is causing createrepo_c to be killed with SIGHUP but this should be an acceptable bandaid solution.

Comment 5 Dan Callaghan 2014-06-02 01:19:57 UTC
On Gerrit: http://gerrit.beaker-project.org/3121

Comment 6 Dan Callaghan 2014-06-02 04:40:01 UTC
This bug fix has been applied to the release-0.16 branch, however we have elected not to do another maintenance release of the 0.16.x series. This fix will be included in 0.17.0 instead.

Comment 8 Dan Callaghan 2014-06-02 04:44:24 UTC
Suggested steps for verification:
1. Upload a task to Beaker
2. On the Beaker server, wait for the createrepo_c process to be started and then: killall -9 createrepo_c
3. Task upload should fail with an XML-RPC fault.
4. Try task upload again, it should succeed.

Comment 10 Dan Callaghan 2014-06-10 23:28:23 UTC
Beaker 0.17.0 has been released.