Bug 920433

Summary: createrepo output is not captured
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: schedulerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: Amit Saha <asaha>
Severity: unspecified Docs Contact:
Priority: urgent    
Version: 0.11CC: asaha, dcallagh, ebaak, llim, qwan, rglasz, rmancy
Target Milestone: 0.12   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Misc
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-11 04:56:07 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 2013-03-12 05:56:56 UTC
If createrepo fails for any reason, Beaker doesn't capture its output so we have no way to know what went wrong (apart from its exit status).

Beaker should capture stdout/stderr from createrepo and include that in the exception if createrepo fails so that it's logged.

Comment 1 Dan Callaghan 2013-03-12 22:35:53 UTC
http://gerrit.beaker-project.org/1796

Comment 3 Amit Saha 2013-03-27 04:20:32 UTC
Steps for verification:

1. Set /var/www/beaker/rpms/repodata permissions on beaker-devel to 555
2. Upload a new task
3. Error message in Web UI: Failed to import task: createrepo failed with exit status 1: Cannot create/verify /var/www/beaker/rpms/./repodata

4. Traceback in server-errors.log:

2013-03-27 00:18:18,394 bkr.server.model ERROR Failed to import tmp-distribution-reservesys-5.0-1.noarch.rpm
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bkr/server/tasks.py", line 234, in save
    Task.update_repo()
  File "/usr/lib/python2.6/site-packages/bkr/server/model.py", line 6314, in update_repo
    % (retcode, output))
ValueError: createrepo failed with exit status 1:
Cannot create/verify /var/www/beaker/rpms/./repodata

Comment 4 Dan Callaghan 2013-03-28 05:57:08 UTC
(In reply to comment #3)
> Cannot create/verify /var/www/beaker/rpms/./repodata

Sad that createrepo doesn't say anything more helpful than that... but I suppose there's nothing we can do about it. :-(

Comment 5 Amit Saha 2013-03-28 05:58:02 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Cannot create/verify /var/www/beaker/rpms/./repodata
> 
> Sad that createrepo doesn't say anything more helpful than that... but I
> suppose there's nothing we can do about it. :-(

yeah, i double checked it to see if it's actually createrepo telling us that :)

Comment 6 Dan Callaghan 2013-04-11 04:56:07 UTC
Beaker 0.12 has been released.