mirror of https://gitee.com/bigwinds/arangodb
Add some more checks to health check (#10564)
This commit is contained in:
parent
ea275d169e
commit
eeadc94e0f
|
@ -1155,7 +1155,17 @@ function checkInstanceAlive (instanceInfo, options) {
|
||||||
rc = instanceInfo.arangods.reduce((previous, arangod) => {
|
rc = instanceInfo.arangods.reduce((previous, arangod) => {
|
||||||
if (arangod.role === "agent") return true;
|
if (arangod.role === "agent") return true;
|
||||||
if (arangod.role === "single") return true;
|
if (arangod.role === "single") return true;
|
||||||
return health.hasOwnProperty(arangod.id) && health[arangod.id].Status === "GOOD";
|
if (health.hasOwnProperty(arangod.id)) {
|
||||||
|
if (health[arangod.id].Status === "GOOD") {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
print(RED + "ClusterHealthCheck failed " + arangod.id + " has status " + health[arangod.id].Status + " (which is not equal to GOOD)");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print(RED + "ClusterHealthCheck failed " + arangod.id + " does not have health property");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}, true);
|
}, true);
|
||||||
} catch (x) {
|
} catch (x) {
|
||||||
print(Date() + " ClusterHealthCheck failed: " + x);
|
print(Date() + " ClusterHealthCheck failed: " + x);
|
||||||
|
|
Loading…
Reference in New Issue