From 26b6406b3b2b9af6d394471566be1267b3e4d811 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 13:00:44 +0000 Subject: [PATCH] fix(deps): update github.com/longhorn/go-common-libs digest to b75404d --- go.mod | 4 ++-- go.sum | 4 ++++ .../longhorn/go-common-libs/types/file.go | 13 ++++++++----- .../go-common-libs/utils/longhorn_naming.go | 11 +++++++++++ vendor/modules.txt | 4 ++-- 5 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 vendor/github.com/longhorn/go-common-libs/utils/longhorn_naming.go diff --git a/go.mod b/go.mod index df59d2f..dd5299e 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/longhorn/go-iscsi-helper go 1.21 require ( - github.com/longhorn/go-common-libs v0.0.0-20240307063052-6e77996eda29 + github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 golang.org/x/sys v0.18.0 @@ -24,6 +24,6 @@ require ( github.com/shirou/gopsutil/v3 v3.24.2 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect k8s.io/klog/v2 v2.110.1 // indirect - k8s.io/mount-utils v0.29.2 // indirect + k8s.io/mount-utils v0.29.3 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect ) diff --git a/go.sum b/go.sum index 9b1d5cd..3e05da5 100644 --- a/go.sum +++ b/go.sum @@ -28,6 +28,8 @@ github.com/longhorn/go-common-libs v0.0.0-20240219051150-081e7dcbfef2 h1:MP6JLqc github.com/longhorn/go-common-libs v0.0.0-20240219051150-081e7dcbfef2/go.mod h1:nIECQARppamt2zwFSdzADRTVKo/7izFwWIS3VWi7D/s= github.com/longhorn/go-common-libs v0.0.0-20240307063052-6e77996eda29 h1:tyzIDCMjQGQzhqAtdJaeEMAaNUZJD/sHERXp+tYc+ms= github.com/longhorn/go-common-libs v0.0.0-20240307063052-6e77996eda29/go.mod h1:ePLGb2r/PJBUIVoVhLOt4bLOeu0S72ZB+fWDWwC8H28= +github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc h1:Eh9Npc5yBcVD8E4zVQIGUtC62HcfqevrHjQ2kh7fJ/E= +github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc/go.mod h1:ESTw7LYBF+dB5VndQNKXKrD6B9s/hF94lotGKXLovlM= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= @@ -91,5 +93,7 @@ k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/mount-utils v0.29.2 h1:FrUfgvOo63nqJRPXKoqN/DW1lMnR/y0pzpFErKh6p2o= k8s.io/mount-utils v0.29.2/go.mod h1:9IWJTMe8tG0MYMLEp60xK9GYVeCdA3g4LowmnVi+t9Y= +k8s.io/mount-utils v0.29.3 h1:iEcqPP7Vv8UClH8nnMfovtmy/04fIloRW9JuSXykoZ0= +k8s.io/mount-utils v0.29.3/go.mod h1:9IWJTMe8tG0MYMLEp60xK9GYVeCdA3g4LowmnVi+t9Y= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= diff --git a/vendor/github.com/longhorn/go-common-libs/types/file.go b/vendor/github.com/longhorn/go-common-libs/types/file.go index 99c035d..e67b01d 100644 --- a/vendor/github.com/longhorn/go-common-libs/types/file.go +++ b/vendor/github.com/longhorn/go-common-libs/types/file.go @@ -9,11 +9,14 @@ var FileLockDefaultTimeout = 24 * time.Hour type DiskDriver string const ( - DiskDriverNone = DiskDriver("") - DiskDriverAio = DiskDriver("aio") - DiskDriverNvme = DiskDriver("nvme") - DiskDriverVirtioScsi = DiskDriver("virtio-scsi") - DiskDriverVirtioBlk = DiskDriver("virtio-blk") + DiskDriverNone = DiskDriver("") + DiskDriverAuto = DiskDriver("auto") + DiskDriverAio = DiskDriver("aio") + DiskDriverNvme = DiskDriver("nvme") + DiskDriverVirtioScsi = DiskDriver("virtio-scsi") + DiskDriverVirtioBlk = DiskDriver("virtio-blk") + DiskDriverVirtioPci = DiskDriver("virtio-pci") + DiskDriverUioPciGeneric = DiskDriver("uio_pci_generic") ) type DiskStat struct { diff --git a/vendor/github.com/longhorn/go-common-libs/utils/longhorn_naming.go b/vendor/github.com/longhorn/go-common-libs/utils/longhorn_naming.go new file mode 100644 index 0000000..a25e0ce --- /dev/null +++ b/vendor/github.com/longhorn/go-common-libs/utils/longhorn_naming.go @@ -0,0 +1,11 @@ +package utils + +import ( + "regexp" +) + +// IsEngineProcess distinguish if the process is a engine process by its name. +func IsEngineProcess(processName string) bool { + // engine process name example: pvc-5a8ee916-5989-46c6-bafc-ddbf7c802499-e-0 + return regexp.MustCompile(`.+?-e-.*\d$`).MatchString(processName) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index e873403..77c097b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -18,7 +18,7 @@ github.com/kr/pretty # github.com/kr/text v0.2.0 ## explicit github.com/kr/text -# github.com/longhorn/go-common-libs v0.0.0-20240307063052-6e77996eda29 +# github.com/longhorn/go-common-libs v0.0.0-20240319112414-b75404dc7fbc ## explicit; go 1.21 github.com/longhorn/go-common-libs/exec github.com/longhorn/go-common-libs/io @@ -71,7 +71,7 @@ k8s.io/klog/v2/internal/dbg k8s.io/klog/v2/internal/serialize k8s.io/klog/v2/internal/severity k8s.io/klog/v2/internal/sloghandler -# k8s.io/mount-utils v0.29.2 +# k8s.io/mount-utils v0.29.3 ## explicit; go 1.21 k8s.io/mount-utils # k8s.io/utils v0.0.0-20230726121419-3b25d923346b