mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Feature #2665: RMProxy logs the proxied method, and manages connection errors
This commit is contained in:
parent
6518290119
commit
3e4fcf369e
@ -33,6 +33,8 @@ RequestManagerProxy::RequestManagerProxy(string _method)
|
||||
|
||||
method = _method;
|
||||
client = new Client("none", master_endpoint, msg_size);
|
||||
|
||||
method_name = ("Proxy - " + method);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
@ -51,7 +53,14 @@ void RequestManagerProxy::request_execute(xmlrpc_c::paramList const& _paramList,
|
||||
{
|
||||
xmlrpc_c::value return_value;
|
||||
|
||||
client->call(client->get_endpoint(), method, _paramList, &return_value);
|
||||
try
|
||||
{
|
||||
client->call(client->get_endpoint(), method, _paramList, &return_value);
|
||||
|
||||
*(att.retval) = return_value;
|
||||
*(att.retval) = return_value;
|
||||
}
|
||||
catch(exception const& e)
|
||||
{
|
||||
failure_response(INTERNAL, request_error("Could not connect to the federation master oned", ""), att);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user