fix(docker): handle the state "unhealthy" as DOWN instead of PENDING (#6292)

Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
benji2k2 2025-12-20 10:26:13 +01:00 committed by GitHub
parent f0ad644995
commit 22a0ed6061
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -768,12 +768,14 @@ class Monitor extends BeanModel {
let res = await axios.request(options);
if (res.data.State.Running) {
if (res.data.State.Health && res.data.State.Health.Status !== "healthy") {
bean.status = PENDING;
bean.msg = res.data.State.Health.Status;
} else {
if (res.data.State.Health.Status === "healthy") {
bean.status = UP;
bean.msg = res.data.State.Health ? res.data.State.Health.Status : res.data.State.Status;
} else if (res.data.State.Health.Status === "unhealthy") {
throw Error("Container State is unhealthy");
} else {
bean.status = PENDING;
bean.msg = res.data.State.Health.Status;
}
} else {
throw Error("Container State is " + res.data.State.Status);