Bug 1003709 - nothing is logged if clear_netboot fails in beaker-proxy
nothing is logged if clear_netboot fails in beaker-proxy
Product: Beaker
Classification: Community
Component: lab controller (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.15.1
: ---
Assigned To: Dan Callaghan
Depends On:
Blocks: 1019537
  Show dependency treegraph
Reported: 2013-09-02 20:09 EDT by Dan Callaghan
Modified: 2018-02-05 19:41 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1019537 (view as bug list)
Last Closed: 2013-10-23 02:56:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dan Callaghan 2013-09-02 20:09:38 EDT
Description of problem:
Nothing is logged if clear_netboot fails in beaker-proxy.

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

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-13 20:13:30 EDT
Comment 5 Nick Coghlan 2013-10-15 22:41:07 EDT
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-15 22:45:25 EDT
According to comment 5, verify this bug.
[root@lab-devel-02 ~]# rpm -qa | grep beaker
Comment 7 Raymond Mancy 2013-10-23 02:56:46 EDT
beaker 0.15.1 has been released.

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