ceph: stop disabling scrubbing during osd orchestration
Signed-off-by: travisn <tnielsen@redhat.com>
This commit is contained in:
2 files changed
-42
No files matched your search
@@ -148,38 +148,6 @@ func OSDRemove(context *clusterd.Context, clusterName string, osdID int) (string
|
||||
return string(buf), err
|
||||
}
|
||||
|
||||
func DisableScrubbing(context *clusterd.Context, clusterName string) (string, error) {
|
||||
args := []string{"osd", "set", "noscrub"}
|
||||
buf, err := ExecuteCephCommand(context, clusterName, args)
|
||||
if err != nil {
|
||||
return string(buf), fmt.Errorf("failed to set noscrub: %+v", err)
|
||||
}
|
||||
|
||||
args = []string{"osd", "set", "nodeep-scrub"}
|
||||
buf, err = ExecuteCephCommand(context, clusterName, args)
|
||||
if err != nil {
|
||||
return string(buf), fmt.Errorf("failed to set nodeep-scrub: %+v", err)
|
||||
}
|
||||
|
||||
return string(buf), nil
|
||||
}
|
||||
|
||||
func EnableScrubbing(context *clusterd.Context, clusterName string) (string, error) {
|
||||
args := []string{"osd", "unset", "noscrub"}
|
||||
buf, err := ExecuteCephCommand(context, clusterName, args)
|
||||
if err != nil {
|
||||
return string(buf), fmt.Errorf("failed to unset noscrub: %+v", err)
|
||||
}
|
||||
|
||||
args = []string{"osd", "unset", "nodeep-scrub"}
|
||||
buf, err = ExecuteCephCommand(context, clusterName, args)
|
||||
if err != nil {
|
||||
return string(buf), fmt.Errorf("failed to unset nodeep-scrub: %+v", err)
|
||||
}
|
||||
|
||||
return string(buf), nil
|
||||
}
|
||||
|
||||
func (usage *OSDUsage) ByID(osdID int) *OSDNodeUsage {
|
||||
for i := range usage.OSDNodes {
|
||||
if usage.OSDNodes[i].ID == osdID {
|
||||
|
||||
@@ -142,16 +142,6 @@ func (c *Cluster) Start() error {
|
||||
logger.Warningf("useAllNodes is set to false and no nodes are specified, no OSD pods are going to be created")
|
||||
}
|
||||
|
||||
// disable scrubbing during orchestration and ensure it gets enabled again afterwards
|
||||
if o, err := client.DisableScrubbing(c.context, c.Namespace); err != nil {
|
||||
logger.Warningf("failed to disable scrubbing: %+v. %s", err, o)
|
||||
}
|
||||
defer func() {
|
||||
if o, err := client.EnableScrubbing(c.context, c.Namespace); err != nil {
|
||||
logger.Warningf("failed to enable scrubbing: %+v. %s", err, o)
|
||||
}
|
||||
}()
|
||||
|
||||
if c.DesiredStorage.UseAllNodes {
|
||||
// resolve all storage nodes
|
||||
c.DesiredStorage.Nodes = nil
|
||||
|
||||
Reference in new issue
Block a user