diff --git a/server/src/com/cloud/cluster/ClusterManagerImpl.java b/server/src/com/cloud/cluster/ClusterManagerImpl.java index a45848eb660..765ab6fc21f 100644 --- a/server/src/com/cloud/cluster/ClusterManagerImpl.java +++ b/server/src/com/cloud/cluster/ClusterManagerImpl.java @@ -739,7 +739,15 @@ public class ClusterManagerImpl implements ClusterManager { Date cutTime = DateUtil.currentGMTTime(); List inactiveList = _mshostDao.getInactiveList(new Date(cutTime.getTime() - heartbeatThreshold)); if(inactiveList.size() > 0) { + if(s_logger.isInfoEnabled()) { + s_logger.info("Found " + inactiveList.size() + " inactive management server node based on timestamp"); + for(ManagementServerHostVO host : inactiveList) + s_logger.info("management server node msid: " + host.getMsid() + ", name: " + host.getName() + ", service ip: " + host.getServiceIP() + ", version: " + host.getVersion()); + } + this.queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeRemoved, inactiveList)); + } else { + s_logger.info("No inactive management server node found"); } } diff --git a/setup/db/db/schema-227to228.sql b/setup/db/db/schema-227to228.sql index 21e10c13e78..e41fc1adb89 100644 --- a/setup/db/db/schema-227to228.sql +++ b/setup/db/db/schema-227to228.sql @@ -137,3 +137,6 @@ ALTER TABLE `cloud`.`data_center` ADD COLUMN `removed` datetime; CREATE INDEX `i_op_lock__mac_ip_thread` on `op_lock` (`mac`, `ip`, `thread`); +UPDATE `cloud`.`mshost` set removed=NULL where removed IS NOT NULL; + +