mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Revert "bug 13379: throw exception, if master cannot connect to slave"
This reverts commit 01768176fcd4b0dfe72baf16039e073d18344578.
This commit is contained in:
parent
38ada9c585
commit
6d0bb6d585
@ -531,12 +531,13 @@ public class XenServerConnectionPool {
|
||||
s_logger.debug(msg);
|
||||
throw new CloudRuntimeException(msg);
|
||||
}
|
||||
Host host = null;
|
||||
synchronized (poolUuid.intern()) {
|
||||
// Let's see if it is an existing connection.
|
||||
mConn = getConnect(poolUuid);
|
||||
if (mConn != null){
|
||||
try{
|
||||
Host.getByUuid(mConn, hostUuid);
|
||||
host = Host.getByUuid(mConn, hostUuid);
|
||||
} catch (Types.SessionInvalid e) {
|
||||
s_logger.debug("Session thgrough ip " + mConn.getIp() + " is invalid for pool(" + poolUuid + ") due to " + e.toString());
|
||||
try {
|
||||
@ -635,6 +636,39 @@ public class XenServerConnectionPool {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( mConn != null ) {
|
||||
if (s_managePool) {
|
||||
try {
|
||||
Map<String, String> args = new HashMap<String, String>();
|
||||
host.callPlugin(mConn, "vmops", "pingxenserver", args);
|
||||
} catch (Types.CannotContactHost e ) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
String msg = "Catch Exception: " + e.getClass().getName() + " Can't connect host " + ipAddress + " due to " + e.toString();
|
||||
s_logger.debug(msg);
|
||||
}
|
||||
PoolEmergencyResetMaster(ipAddress, mConn.getIp(), mConn.getUsername(), mConn.getPassword());
|
||||
} catch (Types.HostOffline e ) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
String msg = "Catch Exception: " + e.getClass().getName() + " Host is offline " + ipAddress + " due to " + e.toString();
|
||||
s_logger.debug(msg);
|
||||
}
|
||||
PoolEmergencyResetMaster(ipAddress, mConn.getIp(), mConn.getUsername(), mConn.getPassword());
|
||||
} catch (Types.HostNotLive e ) {
|
||||
String msg = "Catch Exception: " + e.getClass().getName() + " Host Not Live " + ipAddress + " due to " + e.toString();
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug(msg);
|
||||
}
|
||||
PoolEmergencyResetMaster(ipAddress, mConn.getIp(), mConn.getUsername(), mConn.getPassword());
|
||||
} catch (Exception e) {
|
||||
String msg = "Master can not talk to Slave " + hostUuid + " IP " + ipAddress;
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug(msg);
|
||||
}
|
||||
throw new CloudRuntimeException(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mConn;
|
||||
}
|
||||
|
||||
@ -879,24 +913,6 @@ public class XenServerConnectionPool {
|
||||
}
|
||||
loginWithPassword(this, _username, _password, APIVersion.latest().toString());
|
||||
method_params[0] = getSessionReference();
|
||||
} catch (Types.CannotContactHost e ) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
String msg = "Cannot Contact Host for method: " + method_call + " due to " + e.toString();
|
||||
s_logger.debug(msg);
|
||||
}
|
||||
throw e;
|
||||
} catch (Types.HostOffline e ) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
String msg = "Host Offline for method: " + method_call + " due to " + e.toString();
|
||||
s_logger.debug(msg);
|
||||
}
|
||||
throw e;
|
||||
} catch (Types.HostNotLive e ) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
String msg = "Host is Not alive for method: " + method_call + " due to " + e.toString();
|
||||
s_logger.debug(msg);
|
||||
}
|
||||
throw e;
|
||||
} catch (XmlRpcClientException e) {
|
||||
s_logger.debug("XmlRpcClientException for method: " + method_call + " due to " + e.getMessage());
|
||||
removeConnect(_poolUuid);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user