forked from TrueCloudLab/frostfs-node
[#1110] node: Log maintenance stop only if it was enabled
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
c8e2ca2ab4
commit
4b514f5ba0
1 changed files with 3 additions and 2 deletions
|
@ -388,9 +388,10 @@ func (c *cfg) startMaintenance() {
|
||||||
|
|
||||||
// stops node's maintenance.
|
// stops node's maintenance.
|
||||||
func (c *internals) stopMaintenance() {
|
func (c *internals) stopMaintenance() {
|
||||||
c.isMaintenance.Store(false)
|
if c.isMaintenance.CompareAndSwap(true, false) {
|
||||||
c.log.Info(logs.FrostFSNodeStoppedLocalNodesMaintenance)
|
c.log.Info(logs.FrostFSNodeStoppedLocalNodesMaintenance)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// IsMaintenance checks if storage node is under maintenance.
|
// IsMaintenance checks if storage node is under maintenance.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue