call setIptable before launch heartbeat

This commit is contained in:
anthony 2011-02-16 17:16:19 -08:00
parent 8d1f650a9e
commit b85ecec646
2 changed files with 6 additions and 7 deletions

View File

@ -3751,7 +3751,7 @@ public abstract class CitrixResourceBase implements ServerResource {
String tag = it.next();
if (tag.startsWith("vmops-version-")) {
if (tag.contains(version)) {
s_logger.info(logX(host, "Host " + hr.address + " is already setup."));
s_logger.info(logX(host, "Host " + hr.address + " is already setup."));
return;
} else {
it.remove();
@ -3824,11 +3824,6 @@ public abstract class CitrixResourceBase implements ServerResource {
} finally {
sshConnection.close();
}
if (!setIptables(conn)) {
s_logger.warn("set xenserver Iptable failed");
}
hr.tags.add("vmops-version-" + version);
host.setTags(conn, hr.tags);
} catch (XenAPIException e) {

View File

@ -583,6 +583,11 @@ public class XenServer56Resource extends CitrixResourceBase {
} catch (Exception e) {
throw new CloudRuntimeException("Unable to remove heartbeat tag", e);
}
if (!setIptables(conn)) {
s_logger.warn("set xenserver Iptable failed");
return null;
}
String result = callHostPluginPremium(conn, "heartbeat", "host", _host.uuid, "interval", Integer
.toString(_heartbeatInterval));
@ -590,7 +595,6 @@ public class XenServer56Resource extends CitrixResourceBase {
s_logger.warn("Unable to launch the heartbeat process on " + _host.ip);
return null;
}
return cmds;
}