Skip to content

Commit

Permalink
Fix removing non-existing entries
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Kvapil <[email protected]>
  • Loading branch information
kvaps committed Aug 1, 2024
1 parent 9fa99d6 commit bc3185e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/driver/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"crypto/rand"
"encoding/hex"
"fmt"
"strings"

"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
Expand Down Expand Up @@ -164,6 +165,11 @@ func (s *provisionerServer) DriverDeleteBucket(
func (s *provisionerServer) revokeBucketAccess(ctx context.Context, userId string) error {
err := s.configureS3Access(ctx, userId, "", "", nil, true)
if err != nil {
// Check if the error is because the entry was not found
if strings.HasSuffix(err.Error(), "no entry is found in filer store") {
klog.InfoS("no entry found in filer store, treating as success", "user", userId)
return nil
}
return err
}

Expand Down

0 comments on commit bc3185e

Please sign in to comment.