diff --git a/e2e/rbd.go b/e2e/rbd.go index 57d517967..ae0c06927 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -621,7 +621,7 @@ var _ = Describe("RBD", func() { // Prepare the rbd-nbd with command args attachCmd := strings.ReplaceAll(mapCmd, "map", "attach --device /dev/nbd0") - m1 := regexp.MustCompile(`/keyfile-[0-9]* `) + m1 := regexp.MustCompile(`/keyfile-\d* `) attachCmd = m1.ReplaceAllString(attachCmd, "/keyfile-test ") e2elog.Logf("attach command to run after restart, attachCmd: %v", attachCmd) diff --git a/internal/rbd/nodeserver.go b/internal/rbd/nodeserver.go index ed71fa296..fefb99085 100644 --- a/internal/rbd/nodeserver.go +++ b/internal/rbd/nodeserver.go @@ -575,7 +575,7 @@ func (ns *NodeServer) createTargetMountPath(ctx context.Context, mountPath strin // Check if that mount path exists properly notMnt, err := mount.IsNotMountPoint(ns.mounter, mountPath) if err == nil { - return notMnt, err + return notMnt, nil } if !os.IsNotExist(err) { return false, status.Error(codes.Internal, err.Error()) diff --git a/internal/rbd/replicationcontrollerserver.go b/internal/rbd/replicationcontrollerserver.go index 294e0e897..a8c076bca 100644 --- a/internal/rbd/replicationcontrollerserver.go +++ b/internal/rbd/replicationcontrollerserver.go @@ -165,7 +165,7 @@ func getSchedulingDetails(parameters map[string]string) (admin.Interval, admin.S // validateSchedulingInterval return the interval as it is if its ending with // `m|h|d` or else it will return error. func validateSchedulingInterval(interval string) (admin.Interval, error) { - var re = regexp.MustCompile(`^[0-9]+[mhd]$`) + var re = regexp.MustCompile(`^\d+[mhd]$`) if re.MatchString(interval) { return admin.Interval(interval), nil }