mirror of https://github.com/apache/cloudstack.git
don't need to remove heartbeat tag when reconnect, it breaks HA , because when host reconnects, it tries to create heartbeat, but at this time, master may be able to access storage pool
This commit is contained in:
parent
fba10b1cb8
commit
8d052d105a
|
|
@ -509,25 +509,7 @@ public class XenServer56Resource extends CitrixResourceBase {
|
|||
public StartupCommand[] initialize() {
|
||||
pingxenserver();
|
||||
StartupCommand[] cmds = super.initialize();
|
||||
Connection conn = getConnection();
|
||||
try {
|
||||
Host host = Host.getByUuid(conn, _host.uuid);
|
||||
Set<String> tags = host.getTags(conn);
|
||||
Iterator<String> it = tags.iterator();
|
||||
while (it.hasNext()) {
|
||||
String heartbeatTag = it.next();
|
||||
if (heartbeatTag.contains("cloud-heartbeat-")) {
|
||||
s_logger.debug("Removing heatbeat tag: " + heartbeatTag);
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
host.setTags(conn, tags);
|
||||
} catch (XenAPIException e) {
|
||||
throw new CloudRuntimeException("Unable to remove heartbeat tag", e);
|
||||
} catch (Exception e) {
|
||||
throw new CloudRuntimeException("Unable to remove heartbeat tag", e);
|
||||
}
|
||||
|
||||
Connection conn = getConnection();
|
||||
if (!setIptables(conn)) {
|
||||
s_logger.warn("set xenserver Iptable failed");
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue