forked from TrueCloudLab/frostfs-node
[#1681] node: Block only Object service ops under maintenance
In previous implementation node blocked any operation of local object storage in maintenance mode. There is a need to perform some storage operations like data evacuation or restoration. Do not call block storage engine in maintenance mode. Make all Object service operations to return `apistatus.NodeUnderMaintenance` error from each local op. Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
This commit is contained in:
parent
082602b668
commit
713aea06fa
8 changed files with 86 additions and 31 deletions
|
@ -81,9 +81,12 @@ func WithLogger(l *logger.Logger) Option {
|
|||
|
||||
// WithLocalStorageEngine returns option to set local storage
|
||||
// instance.
|
||||
func WithLocalStorageEngine(e *engine.StorageEngine) Option {
|
||||
func WithLocalStorageEngine(e *engine.StorageEngine, state util.NodeState) Option {
|
||||
return func(c *cfg) {
|
||||
c.localStorage = (*storageEngineWrapper)(e)
|
||||
c.localStorage = &storageEngineWrapper{
|
||||
state: state,
|
||||
storage: e,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue