Bug 1101402 - if createrepo fails Beaker should do its best to clean things up
Summary: if createrepo fails Beaker should do its best to clean things up
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: 0.16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 0.17
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-27 06:45 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-10 23:28:23 UTC
Embargoed:


Attachments (Terms of Use)

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.


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