Use the perfStandby field instead of the method because we don't want to try to grab the readlock when we're servicing a request (#11793)

This commit is contained in:
Nick Cabatoff 2021-06-08 17:55:38 +02:00 committed by GitHub
parent ba3f54f3d2
commit acde7a66f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1168,7 +1168,7 @@ func (b *SystemBackend) handleRemount(ctx context.Context, req *logical.Request,
}
// Attempt remount
if err := b.Core.remount(ctx, fromPath, toPath, !b.Core.PerfStandby()); err != nil {
if err := b.Core.remount(ctx, fromPath, toPath, !b.Core.perfStandby); err != nil {
b.Backend.Logger().Error("remount failed", "from_path", fromPath, "to_path", toPath, "error", err)
return handleError(err)
}