Skip to content

Commit

Permalink
Child should be online before initializing health (netdata#19463)
Browse files Browse the repository at this point in the history
  • Loading branch information
stelfrag authored Jan 23, 2025
1 parent a512eca commit f73c0a5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/database/rrdhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ RRDHOST *rrdhost_find_or_create(
, system_info
, 0
, archived
);
);
}
else {
if (likely(!rrdhost_flag_check(host, RRDHOST_FLAG_PENDING_CONTEXT_LOAD)))
Expand Down Expand Up @@ -765,9 +765,8 @@ bool rrdhost_should_be_removed(RRDHOST *host, RRDHOST *protected_host, time_t no
}

bool rrdhost_should_run_health(RRDHOST *host) {
if (!host->health.enabled ||
!rrdhost_flag_check(host, RRDHOST_FLAG_COLLECTOR_ONLINE) ||
rrdhost_flag_check(host, RRDHOST_FLAG_ORPHAN))
if (!host->health.enabled || !rrdhost_flag_check(host, RRDHOST_FLAG_COLLECTOR_ONLINE) ||
rrdhost_flag_check(host, RRDHOST_FLAG_ORPHAN) || rrdhost_ingestion_status(host) != RRDHOST_INGEST_STATUS_ONLINE)
return false;

return true;
Expand Down

0 comments on commit f73c0a5

Please sign in to comment.