mirror of
https://github.com/status-im/consul.git
synced 2025-02-19 17:14:37 +00:00
agent: maintenance mode is persistent
This commit is contained in:
parent
1f749ce3f2
commit
8819d71f99
@ -1031,7 +1031,7 @@ func (a *Agent) EnableServiceMaintenance(serviceID string) error {
|
|||||||
ServiceName: service.Service,
|
ServiceName: service.Service,
|
||||||
Status: structs.HealthCritical,
|
Status: structs.HealthCritical,
|
||||||
}
|
}
|
||||||
a.state.AddCheck(check)
|
a.AddCheck(check, nil, true)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -1061,7 +1061,7 @@ func (a *Agent) DisableServiceMaintenance(serviceID string) error {
|
|||||||
|
|
||||||
DEREGISTER:
|
DEREGISTER:
|
||||||
// Deregister the maintenance check
|
// Deregister the maintenance check
|
||||||
a.state.RemoveCheck(maintCheckID)
|
a.RemoveCheck(maintCheckID, true)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user