Skip to content

Commit

Permalink
fix #3767 by @nougad - treat empty healthcheck reported by podman as up
Browse files Browse the repository at this point in the history
  • Loading branch information
vfosnar committed Jan 15, 2024
1 parent e94ce54 commit 68c85f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/model/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -747,12 +747,12 @@ 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 === "unhealthy") {
bean.status = DOWN;
bean.msg = res.data.State.Health.Status;
} else if (res.data.State.Health && res.data.State.Health.Status !== "healthy") {
if (res.data.State.Health && ![ "healthy", "unhealthy", "" ].includes(res.data.State.Health.Status)) {
bean.status = PENDING;
bean.msg = res.data.State.Health.Status;
} else if (res.data.State.Health && res.data.State.Health.Status === "unhealthy") {
bean.status = DOWN;
bean.msg = res.data.State.Health.Status;
} else {
bean.status = UP;
bean.msg = res.data.State.Health ? res.data.State.Health.Status : res.data.State.Status;
Expand Down

0 comments on commit 68c85f2

Please sign in to comment.