bug 6415: destroy this host in DB, if this host can't be connected

status 6415: resolved fixed
This commit is contained in:
anthony 2010-10-05 17:20:58 -07:00
parent 550ef02f9c
commit f6f3ab2bc3
1 changed files with 5 additions and 1 deletions

View File

@ -6079,7 +6079,11 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
return new Answer(cmd);
}
Host host = Host.getByUuid(conn, hostuuid);
Pool.eject(conn, host);
try {
Pool.eject(conn, host);
} catch (Exception e) {
host.destroy(conn);
}
return new Answer(cmd);
} catch (XenAPIException e) {
String msg = "Unable to eject host " + _host.uuid + " due to " + e.toString();