forked from TrueCloudLab/frostfs-node
[#49] node: React on SIGHUP only when node in READY state
Add more info in logs when node is going to shut down, but initialization process still in progress. Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
58b6224dd8
commit
b0cf100427
6 changed files with 54 additions and 20 deletions
|
@ -83,10 +83,20 @@ func (c *cfg) NetmapStatus() control.NetmapStatus {
|
|||
|
||||
func (c *cfg) setHealthStatus(st control.HealthStatus) {
|
||||
c.healthStatus.Store(int32(st))
|
||||
c.metricsCollector.State().SetHealth(int32(st))
|
||||
}
|
||||
|
||||
if c.metricsCollector != nil {
|
||||
c.metricsCollector.State().SetHealth(int32(st))
|
||||
func (c *cfg) compareAndSwapHealthStatus(oldSt, newSt control.HealthStatus) (swapped bool) {
|
||||
if swapped = c.healthStatus.CompareAndSwap(int32(oldSt), int32(newSt)); swapped {
|
||||
c.metricsCollector.State().SetHealth(int32(newSt))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *cfg) swapHealthStatus(st control.HealthStatus) (old control.HealthStatus) {
|
||||
old = control.HealthStatus(c.healthStatus.Swap(int32(st)))
|
||||
c.metricsCollector.State().SetHealth(int32(st))
|
||||
return
|
||||
}
|
||||
|
||||
func (c *cfg) HealthStatus() control.HealthStatus {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue