Skip to content

Commit

Permalink
Merge pull request rook#12981 from travisn/filesystem-standby
Browse files Browse the repository at this point in the history
file: Disable active standby when set to false
  • Loading branch information
travisn authored Oct 2, 2023
2 parents 91c0df9 + f7094d1 commit 0e2359d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/daemon/ceph/client/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func getFilesystem(context *clusterd.Context, clusterInfo *ClusterInfo, fsName s

// AllowStandbyReplay gets detailed status information about a Ceph filesystem.
func AllowStandbyReplay(context *clusterd.Context, clusterInfo *ClusterInfo, fsName string, allowStandbyReplay bool) error {
logger.Infof("setting allow_standby_replay for filesystem %q", fsName)
logger.Infof("setting allow_standby_replay to %t for filesystem %q", allowStandbyReplay, fsName)
args := []string{"fs", "set", fsName, "allow_standby_replay", strconv.FormatBool(allowStandbyReplay)}
_, err := NewCephCommand(context, clusterInfo, args).Run()
if err != nil {
Expand Down
6 changes: 2 additions & 4 deletions pkg/operator/ceph/file/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ func createFilesystem(
return errors.Wrapf(err, "failed to create filesystem %q", fs.Name)
}
}
if fs.Spec.MetadataServer.ActiveStandby {
if err := cephclient.AllowStandbyReplay(context, clusterInfo, fs.Name, fs.Spec.MetadataServer.ActiveStandby); err != nil {
return errors.Wrapf(err, "failed to set allow_standby_replay to filesystem %q", fs.Name)
}
if err := cephclient.AllowStandbyReplay(context, clusterInfo, fs.Name, fs.Spec.MetadataServer.ActiveStandby); err != nil {
return errors.Wrapf(err, "failed to set allow_standby_replay to filesystem %q", fs.Name)
}

// set the number of active mds instances
Expand Down

0 comments on commit 0e2359d

Please sign in to comment.