forked from TrueCloudLab/frostfs-node
[#1121] node: Change mode of shard components
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
6f2187a420
commit
806236da78
47 changed files with 194 additions and 100 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
@ -16,9 +17,9 @@ import (
|
|||
var errFailedToChangeExtensionReadOnly = errors.New("failed to change blobovnicza extension: read only mode")
|
||||
|
||||
// Open opens blobovnicza tree.
|
||||
func (b *Blobovniczas) Open(readOnly bool) error {
|
||||
b.readOnly = readOnly
|
||||
b.metrics.SetMode(readOnly)
|
||||
func (b *Blobovniczas) Open(mode mode.ComponentMode) error {
|
||||
b.readOnly = mode.ReadOnly()
|
||||
b.metrics.SetMode(mode)
|
||||
b.metrics.SetRebuildStatus(rebuildStatusNotStarted)
|
||||
b.openManagers()
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue