mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-24 15:20:19 +00:00
cleanup: ErrWaitTimeout is deprecated in k8s 1.27
replaced ErrWaitTimeout with Interrupted Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
This commit is contained in:
parent
6709cdd1d0
commit
92d9785166
@ -18,7 +18,6 @@ package e2e
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
@ -175,7 +174,7 @@ func waitForDeploymentComplete(clientSet kubernetes.Interface, name, ns string,
|
|||||||
return false, nil
|
return false, nil
|
||||||
})
|
})
|
||||||
|
|
||||||
if errors.Is(err, wait.ErrWaitTimeout) {
|
if wait.Interrupted(err) {
|
||||||
err = fmt.Errorf("%s", reason)
|
err = fmt.Errorf("%s", reason)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -18,7 +18,6 @@ package e2e
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@ -1913,7 +1912,7 @@ var _ = Describe("RBD", func() {
|
|||||||
return true, nil
|
return true, nil
|
||||||
})
|
})
|
||||||
|
|
||||||
if errors.Is(err, wait.ErrWaitTimeout) {
|
if wait.Interrupted(err) {
|
||||||
framework.Failf("timed out waiting for the rbd-nbd process: %s", reason)
|
framework.Failf("timed out waiting for the rbd-nbd process: %s", reason)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -19,7 +19,6 @@ package e2e
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
@ -1052,7 +1051,7 @@ func waitToRemoveImagesFromTrash(f *framework.Framework, poolName string, t int)
|
|||||||
return false, nil
|
return false, nil
|
||||||
})
|
})
|
||||||
|
|
||||||
if errors.Is(err, wait.ErrWaitTimeout) {
|
if wait.Interrupted(err) {
|
||||||
err = errReason
|
err = errReason
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ package rbd
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -509,7 +508,7 @@ func waitForrbdImage(ctx context.Context, backoff wait.Backoff, volOptions *rbdV
|
|||||||
return !used, nil
|
return !used, nil
|
||||||
})
|
})
|
||||||
// return error if rbd image has not become available for the specified timeout
|
// return error if rbd image has not become available for the specified timeout
|
||||||
if errors.Is(err, wait.ErrWaitTimeout) {
|
if wait.Interrupted(err) {
|
||||||
return fmt.Errorf("rbd image %s is still being used", imagePath)
|
return fmt.Errorf("rbd image %s is still being used", imagePath)
|
||||||
}
|
}
|
||||||
// return error if any other errors were encountered during waiting for the image to become available
|
// return error if any other errors were encountered during waiting for the image to become available
|
||||||
|
Loading…
Reference in New Issue
Block a user