diff --git a/go.mod b/go.mod index c3aacd32e..17811045c 100644 --- a/go.mod +++ b/go.mod @@ -10,10 +10,10 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/handlers v1.5.2 github.com/gorilla/mux v1.8.1 - github.com/longhorn/backupstore v0.0.0-20240905092550-326b9844e10b - github.com/longhorn/go-common-libs v0.0.0-20240906072425-66d5f9e6ae4e - github.com/longhorn/go-iscsi-helper v0.0.0-20240906072517-88a14fe36c12 - github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff + github.com/longhorn/backupstore v0.0.0-20240907142840-c1268343d512 + github.com/longhorn/go-common-libs v0.0.0-20240907130740-7060fefb5bda + github.com/longhorn/go-iscsi-helper v0.0.0-20240907143006-2d71415d9bd3 + github.com/longhorn/sparse-tools v0.0.0-20240907135423-37af3c64d59d github.com/longhorn/types v0.0.0-20240902072916-1bf23d310acb github.com/moby/moby v23.0.14+incompatible github.com/pkg/errors v0.9.1 @@ -21,7 +21,7 @@ require ( github.com/rancher/go-rancher v0.1.1-0.20190307222549-9756097e5e4c github.com/sirupsen/logrus v1.9.3 github.com/urfave/cli v1.22.15 - golang.org/x/net v0.28.0 + golang.org/x/net v0.29.0 golang.org/x/sys v0.25.0 google.golang.org/grpc v1.66.0 google.golang.org/protobuf v1.34.2 @@ -56,7 +56,7 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/go-ps v1.0.0 // indirect github.com/moby/sys/mountinfo v0.7.1 // indirect - github.com/opencontainers/runc v1.1.13 // indirect + github.com/opencontainers/runc v1.1.14 // indirect github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect @@ -69,7 +69,7 @@ require ( github.com/shirou/gopsutil/v3 v3.24.5 // indirect github.com/slok/goresilience v0.2.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - golang.org/x/text v0.17.0 // indirect + golang.org/x/text v0.18.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect gopkg.in/VividCortex/ewma.v1 v1.1.1 // indirect gopkg.in/fatih/color.v1 v1.7.0 // indirect diff --git a/go.sum b/go.sum index cbbce8b81..7fdc21ec2 100644 --- a/go.sum +++ b/go.sum @@ -78,14 +78,14 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/longhorn/backupstore v0.0.0-20240905092550-326b9844e10b h1:S+VuYPFMq235z7A/GaGTlv7P1GaUMBjWFeXE+ihn/CM= -github.com/longhorn/backupstore v0.0.0-20240905092550-326b9844e10b/go.mod h1:N4cqNhSs4VUw9aGbO2OfyiIvJL7/L53hUrNiT73UN+U= -github.com/longhorn/go-common-libs v0.0.0-20240906072425-66d5f9e6ae4e h1:TL2faRfkI7uggJhBJYioZk6WGg0ODLvxWxQX2cJPVfE= -github.com/longhorn/go-common-libs v0.0.0-20240906072425-66d5f9e6ae4e/go.mod h1:T8DVg3NdJ7XDNJey+UI1IRUtZKnHtB75MHWmclF6mUI= -github.com/longhorn/go-iscsi-helper v0.0.0-20240906072517-88a14fe36c12 h1:iTMBmwlGckmUaS7nEu8lLcnspiUY5OezhqsnKhtC/kA= -github.com/longhorn/go-iscsi-helper v0.0.0-20240906072517-88a14fe36c12/go.mod h1:jGKOrV2URkqBsM4ZB57kDFY1KUtZKe7mvGWOb58eYCU= -github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff h1:gmdQDbnaGJ/zmrK+QJzSys8mH679os6i7vW/pOpRn1U= -github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff/go.mod h1:iUJCZtOKG/9xv2rfrUAYZntFTzP5dZtvy4Kwe6dMcUc= +github.com/longhorn/backupstore v0.0.0-20240907142840-c1268343d512 h1:zrGVZZTClL0isTJf11rbELdAmDi5SME3ItJqAl+s6jU= +github.com/longhorn/backupstore v0.0.0-20240907142840-c1268343d512/go.mod h1:3gjQWnKXqJSxAE6rpM5mrCcbRJyLKXHqgzxyyaLgLSo= +github.com/longhorn/go-common-libs v0.0.0-20240907130740-7060fefb5bda h1:+jlHExQsoeb5B8Avl5tc/mX0rDvPDUhTDVbDitvl5vE= +github.com/longhorn/go-common-libs v0.0.0-20240907130740-7060fefb5bda/go.mod h1:T8DVg3NdJ7XDNJey+UI1IRUtZKnHtB75MHWmclF6mUI= +github.com/longhorn/go-iscsi-helper v0.0.0-20240907143006-2d71415d9bd3 h1:PWXUT0taHZiJU8ItCUmhhJL/m7T3kq2Ak40kfuNbesY= +github.com/longhorn/go-iscsi-helper v0.0.0-20240907143006-2d71415d9bd3/go.mod h1:3f/GmbvwXLWGAnCT1Bj0bb373wd4T48/uZJREbDr//g= +github.com/longhorn/sparse-tools v0.0.0-20240907135423-37af3c64d59d h1:iNrrGcE9TLcaayQgOkdEZDvlzKCWMNhXXJD2d2K4Wyo= +github.com/longhorn/sparse-tools v0.0.0-20240907135423-37af3c64d59d/go.mod h1:iUJCZtOKG/9xv2rfrUAYZntFTzP5dZtvy4Kwe6dMcUc= github.com/longhorn/types v0.0.0-20240902072916-1bf23d310acb h1:8CoW5YYn+SC43o5zFR+wscOd3SgF6rQZjrkXOkJfZPM= github.com/longhorn/types v0.0.0-20240902072916-1bf23d310acb/go.mod h1:KlJuZB8NfHchWshYxYgV9pPIxBKC04Vq05G2TfgMf7w= github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= @@ -101,8 +101,8 @@ github.com/moby/moby v23.0.14+incompatible h1:NyaIFpK1dE6QfuUTtaldEFtq7/S/kV5Ldt github.com/moby/moby v23.0.14+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= github.com/moby/sys/mountinfo v0.7.1 h1:/tTvQaSJRr2FshkhXiIpux6fQ2Zvc4j7tAhMTStAG2g= github.com/moby/sys/mountinfo v0.7.1/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= -github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs= -github.com/opencontainers/runc v1.1.13/go.mod h1:R016aXacfp/gwQBYw2FDGa9m+n6atbLWrYY8hNMT/sA= +github.com/opencontainers/runc v1.1.14 h1:rgSuzbmgz5DUJjeSnw337TxDbRuqjs6iqQck/2weR6w= +github.com/opencontainers/runc v1.1.14/go.mod h1:E4C2z+7BxR7GHXp0hAY53mek+x49X1LjPNeMTfRGvOA= github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 h1:R5M2qXZiK/mWPMT4VldCOiSL9HIAMuxQZWdG0CSM5+4= github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= @@ -168,8 +168,8 @@ go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -177,8 +177,8 @@ golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -196,8 +196,8 @@ golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= diff --git a/vendor/github.com/longhorn/backupstore/Dockerfile.dapper b/vendor/github.com/longhorn/backupstore/Dockerfile.dapper index 6e78d259c..63e91dbad 100644 --- a/vendor/github.com/longhorn/backupstore/Dockerfile.dapper +++ b/vendor/github.com/longhorn/backupstore/Dockerfile.dapper @@ -1,9 +1,10 @@ -FROM registry.suse.com/bci/golang:1.22 +FROM registry.suse.com/bci/golang:1.23 ARG DAPPER_HOST_ARCH=amd64 ARG http_proxy ARG https_proxy ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} +ENV GOLANGCI_LINT_VERSION="v1.60.3" RUN zypper -n install gcc ca-certificates git wget curl vim less file nfs-client awk docker && \ rm -rf /var/cache/zypp/* @@ -11,7 +12,7 @@ RUN zypper -n install gcc ca-certificates git wget curl vim less file nfs-client ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm64=arm64 GOLANG_ARCH=GOLANG_ARCH_${ARCH} \ GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash -RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION} ENV DAPPER_SOURCE /go/src/github.com/longhorn/backupstore ENV DAPPER_OUTPUT ./bin coverage.out diff --git a/vendor/github.com/longhorn/backupstore/cmd/list.go b/vendor/github.com/longhorn/backupstore/cmd/list.go index 92edeb654..a88366277 100644 --- a/vendor/github.com/longhorn/backupstore/cmd/list.go +++ b/vendor/github.com/longhorn/backupstore/cmd/list.go @@ -80,7 +80,7 @@ func ResponseLogAndError(v interface{}) { e, isErr := v.(error) _, isRuntimeErr := e.(runtime.Error) if isErr && !isRuntimeErr { - logrus.Errorf(fmt.Sprint(e)) + logrus.Errorf("%v", e) fmt.Println(fmt.Sprint(e)) } else { logrus.Errorf("Caught FATAL error: %s", v) diff --git a/vendor/github.com/longhorn/backupstore/s3/s3_service.go b/vendor/github.com/longhorn/backupstore/s3/s3_service.go index e5aa7366b..761d4e272 100644 --- a/vendor/github.com/longhorn/backupstore/s3/s3_service.go +++ b/vendor/github.com/longhorn/backupstore/s3/s3_service.go @@ -91,7 +91,7 @@ func parseAwsError(err error) error { if reqErr, ok := err.(awserr.RequestFailure); ok { message += fmt.Sprintln(reqErr.StatusCode(), reqErr.RequestID()) } - return fmt.Errorf(message) + return fmt.Errorf("%s", message) } return err } diff --git a/vendor/github.com/longhorn/sparse-tools/sparse/file.go b/vendor/github.com/longhorn/sparse-tools/sparse/file.go index 187f13a4d..17624bd6a 100644 --- a/vendor/github.com/longhorn/sparse-tools/sparse/file.go +++ b/vendor/github.com/longhorn/sparse-tools/sparse/file.go @@ -347,7 +347,7 @@ func GetFiemapRegionExts(file FileIoProcessor, interval Interval, extCount int) _, exts, errno := file.GetFieMap().FiemapRegion(uint32(extCount), uint64(interval.Begin), uint64(interval.End-interval.Begin)) if errno != 0 { log.Error("Failed to call fiemap.Fiemap(extCount)") - return exts, fmt.Errorf(errno.Error()) + return exts, fmt.Errorf("%v", errno) } log.Tracef("Retrieved %v/%v extents from file %v, interval %+v, elapsed %.2fs", diff --git a/vendor/github.com/longhorn/sparse-tools/sparse/sfold.go b/vendor/github.com/longhorn/sparse-tools/sparse/sfold.go index cfdfe80eb..480e59da1 100644 --- a/vendor/github.com/longhorn/sparse-tools/sparse/sfold.go +++ b/vendor/github.com/longhorn/sparse-tools/sparse/sfold.go @@ -64,7 +64,7 @@ func coalesce(parentFileIo, childFileIo FileIoProcessor, fileSize int64, ops Fil defer func() { if err != nil { - log.Errorf(err.Error()) + log.Errorf("%v", err) updateProgress(progress, atomic.LoadUint32(progress), true, err, progressMutex, ops) } else { updateProgress(progress, progressComplete, true, nil, progressMutex, ops) diff --git a/vendor/github.com/longhorn/sparse-tools/sparse/sprune.go b/vendor/github.com/longhorn/sparse-tools/sparse/sprune.go index 773d0af06..3940b51ca 100644 --- a/vendor/github.com/longhorn/sparse-tools/sparse/sprune.go +++ b/vendor/github.com/longhorn/sparse-tools/sparse/sprune.go @@ -60,7 +60,7 @@ func prune(parentFileIo, childFileIo FileIoProcessor, fileSize int64, ops FileHa defer func() { if err != nil { - log.Errorf(err.Error()) + log.Errorf("%v", err) updateProgress(progress, atomic.LoadUint32(progress), true, err, progressMutex, ops) } else { updateProgress(progress, progressComplete, true, nil, progressMutex, ops) diff --git a/vendor/modules.txt b/vendor/modules.txt index 13d408770..2948e4fad 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -161,7 +161,7 @@ github.com/kr/pretty # github.com/kr/text v0.2.0 ## explicit github.com/kr/text -# github.com/longhorn/backupstore v0.0.0-20240905092550-326b9844e10b +# github.com/longhorn/backupstore v0.0.0-20240907142840-c1268343d512 ## explicit; go 1.22.0 github.com/longhorn/backupstore github.com/longhorn/backupstore/azblob @@ -178,7 +178,7 @@ github.com/longhorn/backupstore/systembackup github.com/longhorn/backupstore/types github.com/longhorn/backupstore/util github.com/longhorn/backupstore/vfs -# github.com/longhorn/go-common-libs v0.0.0-20240906072425-66d5f9e6ae4e +# github.com/longhorn/go-common-libs v0.0.0-20240907130740-7060fefb5bda ## explicit; go 1.22.0 github.com/longhorn/go-common-libs/backup github.com/longhorn/go-common-libs/exec @@ -190,14 +190,14 @@ github.com/longhorn/go-common-libs/sync github.com/longhorn/go-common-libs/sys github.com/longhorn/go-common-libs/types github.com/longhorn/go-common-libs/utils -# github.com/longhorn/go-iscsi-helper v0.0.0-20240906072517-88a14fe36c12 +# github.com/longhorn/go-iscsi-helper v0.0.0-20240907143006-2d71415d9bd3 ## explicit; go 1.22.0 github.com/longhorn/go-iscsi-helper/iscsi github.com/longhorn/go-iscsi-helper/iscsidev github.com/longhorn/go-iscsi-helper/longhorndev github.com/longhorn/go-iscsi-helper/types github.com/longhorn/go-iscsi-helper/util -# github.com/longhorn/sparse-tools v0.0.0-20240729132735-18b207e459ff +# github.com/longhorn/sparse-tools v0.0.0-20240907135423-37af3c64d59d ## explicit; go 1.22.0 github.com/longhorn/sparse-tools/cli/ssync github.com/longhorn/sparse-tools/sparse @@ -226,7 +226,7 @@ github.com/moby/moby/pkg/reexec # github.com/moby/sys/mountinfo v0.7.1 ## explicit; go 1.16 github.com/moby/sys/mountinfo -# github.com/opencontainers/runc v1.1.13 +# github.com/opencontainers/runc v1.1.14 ## explicit; go 1.18 github.com/opencontainers/runc/libcontainer/configs github.com/opencontainers/runc/libcontainer/devices @@ -298,7 +298,7 @@ github.com/urfave/cli # github.com/yusufpapurcu/wmi v1.2.4 ## explicit; go 1.16 github.com/yusufpapurcu/wmi -# golang.org/x/net v0.28.0 +# golang.org/x/net v0.29.0 ## explicit; go 1.18 golang.org/x/net/context golang.org/x/net/http/httpguts @@ -313,7 +313,7 @@ golang.org/x/net/trace golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/text v0.17.0 +# golang.org/x/text v0.18.0 ## explicit; go 1.18 golang.org/x/text/secure/bidirule golang.org/x/text/transform