From 402068301679490707787a3f882968d6ad6b75d4 Mon Sep 17 00:00:00 2001 From: Shiva Krishna Merla Date: Fri, 13 Mar 2020 10:47:38 -0700 Subject: [PATCH] Update common-libs with fixes to handle multipathd timeout cases (#130) Signed-off-by: Shiva Krishna, Merla --- go.mod | 2 +- go.sum | 2 ++ .../hpe-storage/common-host-libs/linux/device.go | 7 +++++-- vendor/modules.txt | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 207f2f0c..0030f236 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.12.0 // indirect github.com/hashicorp/golang-lru v0.5.3 // indirect - github.com/hpe-storage/common-host-libs release-4.1 + github.com/hpe-storage/common-host-libs v0.0.0-20200313165040-d7ff47f5f22f github.com/hpe-storage/k8s-custom-resources v0.0.0-20190828052325-42886f48215c github.com/jonboulle/clockwork v0.1.0 // indirect github.com/json-iterator/go v1.1.8 // indirect diff --git a/go.sum b/go.sum index bfb7847f..1b4637e5 100644 --- a/go.sum +++ b/go.sum @@ -150,6 +150,8 @@ github.com/hpe-storage/common-host-libs v0.0.0-20200203230201-8a454dcea3bc h1:c6 github.com/hpe-storage/common-host-libs v0.0.0-20200203230201-8a454dcea3bc/go.mod h1:qQxvwt4l9C79p2V8bY1P13As1+ylyznKJVp3K2P5bz8= github.com/hpe-storage/common-host-libs v0.0.0-20200310065158-276b0a683231 h1:40E9eVkms/bf8ssd5WgHQNN5ajF6AsgaO1faJJrikxw= github.com/hpe-storage/common-host-libs v0.0.0-20200310065158-276b0a683231/go.mod h1:qQxvwt4l9C79p2V8bY1P13As1+ylyznKJVp3K2P5bz8= +github.com/hpe-storage/common-host-libs v0.0.0-20200313165040-d7ff47f5f22f h1:oe/vhLKDLntBli/7GcKbH5xGCgrE+SdmRqO8LPPPx5w= +github.com/hpe-storage/common-host-libs v0.0.0-20200313165040-d7ff47f5f22f/go.mod h1:qQxvwt4l9C79p2V8bY1P13As1+ylyznKJVp3K2P5bz8= github.com/hpe-storage/k8s-custom-resources v0.0.0-20190828052325-42886f48215c h1:M/4pHhSouEEjd613SFODOskZmn6pS5tWITHdA8MPWMI= github.com/hpe-storage/k8s-custom-resources v0.0.0-20190828052325-42886f48215c/go.mod h1:qYST/Hepa2MRB85zskShx/+WlbUG5bmq/orhy6sA2jE= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= diff --git a/vendor/github.com/hpe-storage/common-host-libs/linux/device.go b/vendor/github.com/hpe-storage/common-host-libs/linux/device.go index 174dcf6a..293dae38 100644 --- a/vendor/github.com/hpe-storage/common-host-libs/linux/device.go +++ b/vendor/github.com/hpe-storage/common-host-libs/linux/device.go @@ -1081,11 +1081,14 @@ func RescanForCapacityUpdates(devicePath string) error { // multipathd takes either mpathx(without prefix) or /dev/dm-x as input devicePath = strings.TrimPrefix(devicePath, "/dev/mapper/") // reload multipath map to apply new size - args = []string{"reload", "map", devicePath} - _, _, err = util.ExecCommandOutput("multipathd", args) + args = []string{"resize", "map", devicePath} + out, _, err := util.ExecCommandOutput("multipathd", args) if err != nil { return err } + if !strings.Contains(out, "ok") { + return fmt.Errorf("failed to rescan device %s on resize, err: %s", devicePath, out) + } } return nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index 793d6761..950beacd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -68,7 +68,7 @@ github.com/hpcloud/tail/ratelimiter github.com/hpcloud/tail/util github.com/hpcloud/tail/watch github.com/hpcloud/tail/winfile -# github.com/hpe-storage/common-host-libs v0.0.0-20200310065158-276b0a683231 +# github.com/hpe-storage/common-host-libs v0.0.0-20200313165040-d7ff47f5f22f github.com/hpe-storage/common-host-libs/chapi github.com/hpe-storage/common-host-libs/concurrent github.com/hpe-storage/common-host-libs/connectivity