Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1003709

Summary: nothing is logged if clear_netboot fails in beaker-proxy
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: lab controllerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.14CC: aigao, asaha, dcallagh, llim, qwan, rmancy, xjia
Target Milestone: 0.15.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1019537 (view as bug list) Environment:
Last Closed: 2013-10-23 06:56:46 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:
Bug Depends On:    
Bug Blocks: 1019537    

Description Dan Callaghan 2013-09-03 00:09:38 UTC
Description of problem:
Nothing is logged if clear_netboot fails in beaker-proxy.

Version-Release number of selected component (if applicable):
0.14

Steps to Reproduce:
1. Break beaker-proxy's ability to run 'sudo beaker-clear-netboot', for example by commenting out the lines in /etc/sudoers.d/beaker_proxy_clear_netboot
2. Make a call to beaker-proxy to clear netboot for some system, using either XML-RPC or HTTP GET:

>>> import xmlrpclib
>>> s = xmlrpclib.ServerProxy('http://localhost:8000/RPC2')
>>> s.clear_netboot('testsystem.example.com')

>>> import requests
>>> requests.get('http://localhost:8000/nopxe/testsystem.example.com')

Actual results:
Clients receive an XML-RPC fault or HTTP 500 response, which is correct, but on the beaker-proxy side nothing useful is logged indicating that the request failed, or why.

Expected results:
Log messages in /var/log/beaker/proxy.log showing that the request failed, and why (in particular, the error message from sudo or beaker-clear-netboot if there was one).

Additional info:
Two problems here: failed XML-RPC calls are not logged at all, and failed HTTP requests are logged to stderr (which goes nowhere). Secondly, the actual error from sudo on its stderr is also not captured so it goes nowhere as well.

Comment 2 Dan Callaghan 2013-10-14 00:13:30 UTC
http://gerrit.beaker-project.org/2354

Comment 5 Nick Coghlan 2013-10-16 02:41:07 UTC
Ah, it looks like we completely missed fixing the XML-RPC side of things.

Since we normally only use the HTTP API for this (see http://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/snippets/clear_netboot), I created bug 1019537 to cover fixing the XML-RPC error logging as a separate problem. That means this bug only relates to fixing the error logging for requests received over HTTP.

Comment 6 xjia 2013-10-16 02:45:25 UTC
According to comment 5, verify this bug.
[root@lab-devel-02 ~]# rpm -qa | grep beaker
beaker-lab-controller-0.15.0-1.git.23.4a69b21.el6eng.noarch
beaker-redhat-0.1.54-1.el6eng.noarch
beaker-client-0.15.0-1.git.23.4a69b21.el6eng.noarch
beaker-lab-controller-addDistro-0.15.0-1.git.23.4a69b21.el6eng.noarch
beaker-0.15.0-1.git.23.4a69b21.el6eng.noarch

Comment 7 Raymond Mancy 2013-10-23 06:56:46 UTC
beaker 0.15.1 has been released.