packer-plugin-openstack icon indicating copy to clipboard operation
packer-plugin-openstack copied to clipboard

openstack builder hangs when using use_blockstorage_volume if volume size is too small

Open ghost opened this issue 4 years ago • 1 comments

This issue was originally opened by @puetzk as hashicorp/packer#6957. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


From https://github.com/hashicorp/packer/issues/6956#issuecomment-435854310

If the value determined by GetVolumeSize is actually too low, perhaps an image with no value set for MinDiskGigabytes, in a format (e.g. qcow2) where the file is considerably smaller than the minimum volume that can unpack it, the volume is created but the status shown in cinder list becomes "error". WaitForVolume doesn't seem to recognize this case, and just keeps looping (and waiting) indefinitely), since volumes.Get is succeeding (the GUID does exist and has a status to read), and "error" != "available".

ghost avatar Apr 21 '21 16:04 ghost

I believe this issue remains valid in that WaitForVolume seems unchanged, and will only exit for network errors https://github.com/hashicorp/packer-plugin-openstack/blob/ae1177934942f7f7caff6a39591461738ac65dc7/builder/openstack/volume.go#L21

and successful completion https://github.com/hashicorp/packer-plugin-openstack/blob/ae1177934942f7f7caff6a39591461738ac65dc7/builder/openstack/volume.go#L35

So it will continue to wait and re-check if the service is reporting status == "error", even though nothing is going to change. However, our company has shut down their openstack environment, so it is no longer important to me specifically, and I would not have an environment in which to test any changes.

puetzk avatar Apr 21 '21 17:04 puetzk