mirror of
https://github.com/netdata/netdata.git
synced 2025-04-27 22:26:21 +00:00
Remove host immediately on stale node removal (#18381)
This commit is contained in:
parent
b189ee43f4
commit
7160892c0a
1 changed files with 3 additions and 0 deletions
|
@ -382,6 +382,9 @@ static cmd_status_t cmd_remove_node(char *args, char **message)
|
||||||
freez(host->node_id);
|
freez(host->node_id);
|
||||||
host->node_id = NULL;
|
host->node_id = NULL;
|
||||||
buffer_sprintf(wb, "Unregistering node with machine guid %s, hostname = %s", host->machine_guid, rrdhost_hostname(host));
|
buffer_sprintf(wb, "Unregistering node with machine guid %s, hostname = %s", host->machine_guid, rrdhost_hostname(host));
|
||||||
|
rrd_wrlock();
|
||||||
|
rrdhost_free___while_having_rrd_wrlock(host, true);
|
||||||
|
rrd_wrunlock();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
buffer_sprintf(wb, "Node with machine guid %s, hostname = %s is already unregistered", host->machine_guid, rrdhost_hostname(host));
|
buffer_sprintf(wb, "Node with machine guid %s, hostname = %s is already unregistered", host->machine_guid, rrdhost_hostname(host));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue