Fix event when Cinder volume can not be expanded when in-use

This commit is contained in:
Hemant Kumar 2019-08-13 14:42:29 -04:00
parent 77fca12f66
commit 596d5f7983

View File

@ -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