mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cephfs: upgrade fscrypt version to fix concurrency issue
In older versions of fscrypt there is a race condition when multiple encrypted cephfs instances are deployed simultaneously. Signed-off-by: NymanRobin <robin.nyman@est.tech>
This commit is contained in:
8
vendor/github.com/google/fscrypt/actions/context.go
generated
vendored
8
vendor/github.com/google/fscrypt/actions/context.go
generated
vendored
@ -22,10 +22,10 @@
|
||||
// All of the actions include a significant amount of logging, so that good
|
||||
// output can be provided for cmd/fscrypt's verbose mode.
|
||||
// The top-level actions currently include:
|
||||
// - Creating a new config file
|
||||
// - Creating a context on which to perform actions
|
||||
// - Creating, unlocking, and modifying Protectors
|
||||
// - Creating, unlocking, and modifying Policies
|
||||
// - Creating a new config file
|
||||
// - Creating a context on which to perform actions
|
||||
// - Creating, unlocking, and modifying Protectors
|
||||
// - Creating, unlocking, and modifying Policies
|
||||
package actions
|
||||
|
||||
import (
|
||||
|
5
vendor/github.com/google/fscrypt/actions/policy.go
generated
vendored
5
vendor/github.com/google/fscrypt/actions/policy.go
generated
vendored
@ -24,6 +24,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"os/user"
|
||||
"reflect"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/protobuf/proto"
|
||||
@ -452,7 +453,7 @@ func (policy *Policy) AddProtector(protector *Protector) error {
|
||||
|
||||
// If the protector is on a different filesystem, we need to add a link
|
||||
// to it on the policy's filesystem.
|
||||
if policy.Context.Mount != protector.Context.Mount {
|
||||
if !reflect.DeepEqual(policy.Context.Mount, protector.Context.Mount) {
|
||||
log.Printf("policy on %s\n protector on %s\n", policy.Context.Mount, protector.Context.Mount)
|
||||
ownerIfCreating, err := getOwnerOfMetadataForProtector(protector)
|
||||
if err != nil {
|
||||
@ -525,7 +526,7 @@ func (policy *Policy) RemoveProtector(protectorDescriptor string) error {
|
||||
func (policy *Policy) Apply(path string) error {
|
||||
if pathMount, err := filesystem.FindMount(path); err != nil {
|
||||
return err
|
||||
} else if pathMount != policy.Context.Mount {
|
||||
} else if !reflect.DeepEqual(pathMount, policy.Context.Mount) {
|
||||
return &ErrDifferentFilesystem{policy.Context.Mount, pathMount}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user