Merge pull request #12982 from rook/mergify/bp/release-1.12/pr-12981

file: Disable active standby when set to false (backport #12981)
This commit is contained in:
mergify[bot] authored and GitHub committed 2023-10-02 17:01:13 +00:00
commit 97a2fedb32
2 files changed
+3 -5

No files matched your search

+1 -1
View File
@@ -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 {
+2 -4
View File
@@ -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