From 596d5f79836ab651564366bc05c3ca5d42f1074a Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Tue, 13 Aug 2019 14:42:29 -0400 Subject: [PATCH] Fix event when Cinder volume can not be expanded when in-use --- pkg/cloudprovider/providers/openstack/openstack_volumes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cloudprovider/providers/openstack/openstack_volumes.go b/pkg/cloudprovider/providers/openstack/openstack_volumes.go index 4d1f39b5479..9a98b3c4953 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_volumes.go +++ b/pkg/cloudprovider/providers/openstack/openstack_volumes.go @@ -418,7 +418,7 @@ func (os *OpenStack) ExpandVolume(volumeID string, oldSize resource.Quantity, ne } if volume.Status != volumeAvailableStatus { // cinder volume can not be expanded if its status is not available - return oldSize, fmt.Errorf("volume status is not available") + return oldSize, fmt.Errorf("volume in %s status can not be expanded, it must be available and not attached to a node", volume.Status) } // Cinder works with gigabytes, convert to GiB with rounding up