From 0cc253438ccffd0386cf4e7af93c881e81b41345 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Sun, 18 Aug 2024 03:35:02 +0000 Subject: [PATCH] fix: bump mount-utils to treat ENODEV error as corrupted mount --- go.mod | 2 +- go.sum | 4 ++-- vendor/k8s.io/mount-utils/mount_helper_unix.go | 8 +++++++- vendor/modules.txt | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index cda1c634939..b3d1ab40282 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( k8s.io/component-base v0.28.12 k8s.io/klog/v2 v2.110.1 k8s.io/kubernetes v1.28.12 - k8s.io/mount-utils v0.29.3 + k8s.io/mount-utils v0.29.8 k8s.io/pod-security-admission v0.28.8 k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/cloud-provider-azure v1.28.9 diff --git a/go.sum b/go.sum index 8f3ba235f99..08b8f8ff045 100644 --- a/go.sum +++ b/go.sum @@ -468,8 +468,8 @@ k8s.io/kubelet v0.28.12 h1:ACRS1b6XxIxAJoOJ95bsy0qm0DoxD6h/Dwi4U6Pot74= k8s.io/kubelet v0.28.12/go.mod h1:DYlF/KqAA4WoiBElCjeDKGv2K37FLTUmTWyxMDv9s8A= k8s.io/kubernetes v1.28.12 h1:DtWB8ZjoYiN/PXD4qDXFppf9IouVUavn6r3S+3NMUkU= k8s.io/kubernetes v1.28.12/go.mod h1:chlmcCDBnOA/y+572cw8dO0Rci1wiA8bm5+zhPdFLCk= -k8s.io/mount-utils v0.29.3 h1:iEcqPP7Vv8UClH8nnMfovtmy/04fIloRW9JuSXykoZ0= -k8s.io/mount-utils v0.29.3/go.mod h1:9IWJTMe8tG0MYMLEp60xK9GYVeCdA3g4LowmnVi+t9Y= +k8s.io/mount-utils v0.29.8 h1:Bf1H+43DXRuusBEhHrxZkdt8ULbm2Rq70nDRy9+GQV0= +k8s.io/mount-utils v0.29.8/go.mod h1:SHUMR9n3b6tLgEmlyT36cL6fV6Sjwa5CJhc0guCXvb0= k8s.io/pod-security-admission v0.28.8 h1:A61fnzRmIhYRv1AUKYkljxYJVxDAypA4dARb39xBJ4I= k8s.io/pod-security-admission v0.28.8/go.mod h1:U4cWJbHID2xQ8ZZpXadK7ccGPUDPz+TU4leXKMF4j2Y= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= diff --git a/vendor/k8s.io/mount-utils/mount_helper_unix.go b/vendor/k8s.io/mount-utils/mount_helper_unix.go index 9193e7c8d2b..1c603dca7a0 100644 --- a/vendor/k8s.io/mount-utils/mount_helper_unix.go +++ b/vendor/k8s.io/mount-utils/mount_helper_unix.go @@ -61,7 +61,13 @@ func IsCorruptedMnt(err error) bool { underlyingError = err } - return underlyingError == syscall.ENOTCONN || underlyingError == syscall.ESTALE || underlyingError == syscall.EIO || underlyingError == syscall.EACCES || underlyingError == syscall.EHOSTDOWN || underlyingError == syscall.EWOULDBLOCK + return errors.Is(underlyingError, syscall.ENOTCONN) || + errors.Is(underlyingError, syscall.ESTALE) || + errors.Is(underlyingError, syscall.EIO) || + errors.Is(underlyingError, syscall.EACCES) || + errors.Is(underlyingError, syscall.EHOSTDOWN) || + errors.Is(underlyingError, syscall.EWOULDBLOCK) || + errors.Is(underlyingError, syscall.ENODEV) } // MountInfo represents a single line in /proc//mountinfo. diff --git a/vendor/modules.txt b/vendor/modules.txt index e963beec33c..5b515a114a1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1342,7 +1342,7 @@ k8s.io/kubernetes/test/utils k8s.io/kubernetes/test/utils/format k8s.io/kubernetes/test/utils/image k8s.io/kubernetes/test/utils/kubeconfig -# k8s.io/mount-utils v0.29.3 +# k8s.io/mount-utils v0.29.8 ## explicit; go 1.21 k8s.io/mount-utils # k8s.io/pod-security-admission v0.28.8