mirror of https://github.com/apache/cloudstack.git
add more log
This commit is contained in:
parent
0755c86304
commit
df98eb732a
|
|
@ -159,6 +159,9 @@ public class XenServerConnectionPool {
|
|||
}
|
||||
|
||||
protected synchronized void cleanup(String poolUuid) {
|
||||
if( poolUuid == null ) {
|
||||
return;
|
||||
}
|
||||
ConnectionInfo info = _infos.remove(poolUuid);
|
||||
if (info == null) {
|
||||
return;
|
||||
|
|
@ -187,8 +190,10 @@ public class XenServerConnectionPool {
|
|||
|
||||
protected synchronized void cleanup(String poolUuid, ConnectionInfo info) {
|
||||
ConnectionInfo info2 = _infos.get(poolUuid);
|
||||
s_logger
|
||||
.debug("Cleanup for Session " + info.conn.getSessionReference());
|
||||
if( info2 == null ) {
|
||||
return;
|
||||
}
|
||||
s_logger.debug("Cleanup for Session " + info.conn.getSessionReference());
|
||||
if (info != info2) {
|
||||
s_logger.debug("Session " + info.conn.getSessionReference()
|
||||
+ " is already logged out.");
|
||||
|
|
@ -796,18 +801,20 @@ public class XenServerConnectionPool {
|
|||
try {
|
||||
return super.dispatch(method_call, method_params);
|
||||
} catch (Types.SessionInvalid e) {
|
||||
s_logger.debug("Session is invalid for method: " + method_call + " due to " + e.getMessage() + ". Reconnecting...retry="
|
||||
+ retries);
|
||||
if (retries >= _retries) {
|
||||
if (_poolUuid != null) {
|
||||
cleanup(_poolUuid, _info);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
s_logger.debug("Session is invalid. Reconnecting...retry="
|
||||
+ retries);
|
||||
Session.loginWithPassword(this, _username,
|
||||
_password, APIVersion.latest().toString());
|
||||
method_params[0] = getSessionReference();
|
||||
} catch (XmlRpcException e) {
|
||||
s_logger.debug("XmlRpcException for method: " + method_call + " due to " + e.getMessage() + ". Reconnecting...retry="
|
||||
+ retries);
|
||||
if (retries >= _retries) {
|
||||
if (_poolUuid != null) {
|
||||
cleanup(_poolUuid, _info);
|
||||
|
|
@ -821,9 +828,9 @@ public class XenServerConnectionPool {
|
|||
}
|
||||
throw e;
|
||||
}
|
||||
s_logger.debug("Connection couldn't be made for method " + method_call
|
||||
+ " Reconnecting....retry=" + retries);
|
||||
} catch (Types.HostIsSlave e) {
|
||||
s_logger.debug("HostIsSlave Exception for method: " + method_call + " due to " + e.getMessage() + ". Reconnecting...retry="
|
||||
+ retries);
|
||||
if (_poolUuid != null) {
|
||||
cleanup(_poolUuid, _info);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue