Bug 1003709 - nothing is logged if clear_netboot fails in beaker-proxy
Summary: nothing is logged if clear_netboot fails in beaker-proxy
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: lab controller
Version: 0.14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 0.15.1
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 1019537
TreeView+ depends on / blocked
 
Reported: 2013-09-03 00:09 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
: 1019537 (view as bug list)
Environment:
Last Closed: 2013-10-23 06:56:46 UTC
Embargoed:


Attachments (Terms of Use)

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.


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