From 65135bc070cdbe4b113c9d36b19671edf6194c7b Mon Sep 17 00:00:00 2001 From: Derek Su Date: Thu, 29 Sep 2022 13:01:43 +0800 Subject: [PATCH] vendor: update longhorn-engine Longhorn 4552 Longhorn 4580 Signed-off-by: Derek Su --- go.mod | 3 +- go.sum | 7 +++-- .../longhorn/go-iscsi-helper/util/util.go | 28 +++++++++---------- vendor/modules.txt | 4 +-- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index 25fb32bfa..73599428a 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,8 @@ require ( github.com/golang/protobuf v1.3.3-0.20190920234318-1680a479a2cf github.com/google/uuid v1.3.0 github.com/longhorn/backupstore v0.0.0-20220913112826-5f5c95274f2a - github.com/longhorn/longhorn-engine v1.3.1-0.20220919072331-330a008f54ff + github.com/longhorn/go-iscsi-helper v0.0.0-20220927074943-051bf960608b // indirect + github.com/longhorn/longhorn-engine v1.3.2-0.20220929032851-7aac8ae9c8b4 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.8.1 github.com/tinylib/msgp v1.1.1-0.20190612170807-0573788bc2a8 // indirect diff --git a/go.sum b/go.sum index a8f8889bc..a735330bd 100644 --- a/go.sum +++ b/go.sum @@ -48,10 +48,11 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/longhorn/backupstore v0.0.0-20220913112826-5f5c95274f2a h1:f+mLqp3A5M7plw1pBgf8K1nvJxSU7mrGtU7bii+W5Bk= github.com/longhorn/backupstore v0.0.0-20220913112826-5f5c95274f2a/go.mod h1:hvIVsrpjPey7KupirAh0WoPMg0ArWnE6fA5bI30X7AI= -github.com/longhorn/go-iscsi-helper v0.0.0-20220805034259-7b59e22574bb h1:zwAHsMzVfHNEMwAO3Mu2il0dcPGyJsZZuYED7ASbvfc= github.com/longhorn/go-iscsi-helper v0.0.0-20220805034259-7b59e22574bb/go.mod h1:9z/y9glKmWEdV50tjlUPxFwi1goQfIrrsoZbnMyIZbY= -github.com/longhorn/longhorn-engine v1.3.1-0.20220919072331-330a008f54ff h1:bZiauAib+QiZrkGPKsu9RLh75ZS7uFLQhCQuAbMtc6o= -github.com/longhorn/longhorn-engine v1.3.1-0.20220919072331-330a008f54ff/go.mod h1:AC5smEVsxdJKI+joa0vSUPLd0Cp/xEQiqAsh3UM3UfY= +github.com/longhorn/go-iscsi-helper v0.0.0-20220927074943-051bf960608b h1:nGWLOG/u+hT1aQnygRavj31JxPwfig/Ts8EnqUVEW6o= +github.com/longhorn/go-iscsi-helper v0.0.0-20220927074943-051bf960608b/go.mod h1:9z/y9glKmWEdV50tjlUPxFwi1goQfIrrsoZbnMyIZbY= +github.com/longhorn/longhorn-engine v1.3.2-0.20220929032851-7aac8ae9c8b4 h1:hNdnSDe6vRZ3uIi6rZIsVITdXAR0G86gLIOJVQtICCo= +github.com/longhorn/longhorn-engine v1.3.2-0.20220929032851-7aac8ae9c8b4/go.mod h1:AC5smEVsxdJKI+joa0vSUPLd0Cp/xEQiqAsh3UM3UfY= github.com/longhorn/nsfilelock v0.0.0-20200723175406-fa7c83ad0003/go.mod h1:0CLeXlf59Lg6C0kjLSDf47ft73Dh37CwymYRKWwAn04= github.com/longhorn/sparse-tools v0.0.0-20220323120706-0bd9b4129826 h1:8IeuJT9y0xFGSfSl9dOG/L6dJOGtIrS3nYqgo3eYzao= github.com/longhorn/sparse-tools v0.0.0-20220323120706-0bd9b4129826/go.mod h1:BWM7yTPb1DulG18EE/Jy20LVIySzIYoZpiOYFtAGwZo= diff --git a/vendor/github.com/longhorn/go-iscsi-helper/util/util.go b/vendor/github.com/longhorn/go-iscsi-helper/util/util.go index 370688022..3df1e6e7d 100644 --- a/vendor/github.com/longhorn/go-iscsi-helper/util/util.go +++ b/vendor/github.com/longhorn/go-iscsi-helper/util/util.go @@ -68,7 +68,7 @@ func GetIPToHost() (string, error) { if ip != "" { return ip, nil } - return "", fmt.Errorf("Cannot find IP connect to the host") + return "", fmt.Errorf("cannot find IP connect to the host") } type NamespaceExecutor struct { @@ -86,13 +86,13 @@ func NewNamespaceExecutor(ns string) (*NamespaceExecutor, error) { mntNS := filepath.Join(ns, "mnt") netNS := filepath.Join(ns, "net") if _, err := Execute(NSBinary, []string{"-V"}); err != nil { - return nil, fmt.Errorf("Cannot find nsenter for namespace switching") + return nil, fmt.Errorf("cannot find nsenter for namespace switching") } if _, err := Execute(NSBinary, []string{"--mount=" + mntNS, "mount"}); err != nil { - return nil, fmt.Errorf("Invalid mount namespace %v, error %v", mntNS, err) + return nil, fmt.Errorf("invalid mount namespace %v, error %v", mntNS, err) } if _, err := Execute(NSBinary, []string{"--net=" + netNS, "ip", "addr"}); err != nil { - return nil, fmt.Errorf("Invalid net namespace %v, error %v", netNS, err) + return nil, fmt.Errorf("invalid net namespace %v, error %v", netNS, err) } return ne, nil } @@ -154,12 +154,12 @@ func ExecuteWithTimeout(timeout time.Duration, binary string, args []string) (st } } - return "", fmt.Errorf("Timeout executing: %v %v, output %s, stderr, %s, error %w", + return "", fmt.Errorf("timeout executing: %v %v, output %s, stderr, %s, error %w", binary, args, output.String(), stderr.String(), err) } if err != nil { - return "", fmt.Errorf("Failed to execute: %v %v, output %s, stderr, %s, error %w", + return "", fmt.Errorf("failed to execute: %v %v, output %s, stderr, %s, error %w", binary, args, output.String(), stderr.String(), err) } return output.String(), nil @@ -176,7 +176,7 @@ func ExecuteWithoutTimeout(binary string, args []string) (string, error) { cmd.Stderr = &stderr if err = cmd.Run(); err != nil { - return "", fmt.Errorf("Failed to execute: %v %v, output %s, stderr, %s, error %w", + return "", fmt.Errorf("failed to execute: %v %v, output %s, stderr, %s, error %w", binary, args, output.String(), stderr.String(), err) } return output.String(), nil @@ -228,12 +228,12 @@ func ExecuteWithStdin(binary string, args []string, stdinString string) (string, } } - return "", fmt.Errorf("Timeout executing: %v %v, output %s, stderr, %s, error %w", + return "", fmt.Errorf("timeout executing: %v %v, output %s, stderr, %s, error %w", binary, args, output.String(), stderr.String(), err) } if err != nil { - return "", fmt.Errorf("Failed to execute: %v %v, output %s, stderr, %s, error %w", + return "", fmt.Errorf("failed to execute: %v %v, output %s, stderr, %s, error %w", binary, args, output.String(), stderr.String(), err) } return output.String(), nil @@ -246,7 +246,7 @@ func RemoveFile(file string) error { } if err := remove(file); err != nil { - return fmt.Errorf("fail to remove file %v: %w", file, err) + return fmt.Errorf("failed to remove file %v: %w", file, err) } return nil @@ -255,7 +255,7 @@ func RemoveFile(file string) error { func RemoveDevice(dev string) error { if _, err := os.Stat(dev); err == nil { if err := remove(dev); err != nil { - return fmt.Errorf("Failed to removing device %s, %w", dev, err) + return fmt.Errorf("failed to removing device %s, %w", dev, err) } } return nil @@ -293,7 +293,7 @@ func GetKnownDevices(ne *NamespaceExecutor) (map[string]*KernelDevice, error) { Name: f[0], } if _, err := fmt.Sscanf(f[1], "%d:%d", &dev.Major, &dev.Minor); err != nil { - return nil, fmt.Errorf("Invalid major:minor %s for device %s", dev.Name, f[1]) + return nil, fmt.Errorf("invalid major:minor %s for device %s", dev.Name, f[1]) } knownDevices[dev.Name] = dev } @@ -304,10 +304,10 @@ func GetKnownDevices(ne *NamespaceExecutor) (map[string]*KernelDevice, error) { func DuplicateDevice(dev *KernelDevice, dest string) error { if err := mknod(dest, dev.Major, dev.Minor); err != nil { - return fmt.Errorf("Cannot create device node %s for device %s", dest, dev.Name) + return fmt.Errorf("cannot create device node %s for device %s", dest, dev.Name) } if err := os.Chmod(dest, 0660); err != nil { - return fmt.Errorf("Couldn't change permission of the device %s: %w", dest, err) + return fmt.Errorf("couldn't change permission of the device %s: %w", dest, err) } return nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index 53d62339a..fc188678e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -77,9 +77,9 @@ github.com/longhorn/backupstore/nfs github.com/longhorn/backupstore/s3 github.com/longhorn/backupstore/util github.com/longhorn/backupstore/vfs -# github.com/longhorn/go-iscsi-helper v0.0.0-20220805034259-7b59e22574bb +# github.com/longhorn/go-iscsi-helper v0.0.0-20220927074943-051bf960608b github.com/longhorn/go-iscsi-helper/util -# github.com/longhorn/longhorn-engine v1.3.1-0.20220919072331-330a008f54ff +# github.com/longhorn/longhorn-engine v1.3.2-0.20220929032851-7aac8ae9c8b4 github.com/longhorn/longhorn-engine/pkg/backingfile github.com/longhorn/longhorn-engine/pkg/controller/client github.com/longhorn/longhorn-engine/pkg/meta