Red Hat Bugzilla – Bug 1003709
nothing is logged if clear_netboot fails in beaker-proxy
Last modified: 2018-02-05 19:41:31 EST
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')
>>> import requests
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.
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).
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.
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.
According to comment 5, verify this bug.
[root@lab-devel-02 ~]# rpm -qa | grep beaker
beaker 0.15.1 has been released.