hashicorp / hashicorp/packer-plugin-openstack
openstack builder hangs when using use_blockstorage_volume if volume size is too small
- Dominant language
- Go
- Stars
- 29
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
_This issue was originally opened by @puetzk as hashicorp/packer#6957. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._
From https://github.com/hashicorp/packer/issues/6956#issuecomment-435854310
If the value determined by [GetVolumeSize](https://github.com/hashicorp/packer/blob/17b368cf8b0a808a48e30083d7d4c42943f4c1b3/builder/openstack/volume.go#L47) 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](https://github.com/hashicorp/packer/blob/17b368cf8b0a808a48e30083d7d4c42943f4c1b3/builder/openstack/volume.go#L13) 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"](https://github.com/hashicorp/packer/blob/17b368cf8b0a808a48e30083d7d4c42943f4c1b3/builder/openstack/volume.go#L47).
Contributor guide
Assessment
This issue has not been assessed yet.