Skip to content

Commit b9a63c4

Browse files
committed
Merge pull request #20 from fborn/fix_enableha_xenserver
Fix enableHA XenServer
2 parents b276d9b + 3212040 commit b9a63c4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cloudstackops/xenserver.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,10 @@ def pool_ha_enable(self, host):
220220
print "Note: Enabling HA"
221221
try:
222222
with settings(host_string=self.ssh_user + "@" + host.ipaddress):
223-
return fab.run("xe pool-ha-enable heartbeat-sr-uuids=$(xe sr-list type=nfs params=uuid --minimal) ha-config:timeout=180 ha-config:ha-host-failures-to-tolerate=1")
223+
if fab.run("cat /etc/redhat-release | awk '{ $3 = substr($3,1,3); print $3 }'") == "6.2":
224+
return fab.run("xe pool-ha-enable heartbeat-sr-uuids=$(xe sr-list type=nfs params=uuid --minimal) ha-config:timeout=180 ha-config:ha-host-failures-to-tolerate=1")
225+
else:
226+
return fab.run("xe pool-ha-enable heartbeat-sr-uuids=$(xe sr-list type=nfs params=uuid --minimal) ha-config:timeout=180; xe pool-param-set uuid=$(xe pool-list params=uuid --minimal) ha-host-failures-to-tolerate=1")
224227
except:
225228
return False
226229

0 commit comments

Comments
 (0)