Openstack availability zone binding


I’m trying to build an Openstack image with Packer. However even without any provisioners set up (only a simple packer build without any modifications) the image becomes bound to one availability zone. So when I try to provision an instance (again, a very basic one - instance and port) it will work only on the az that Packer used to provision the image.
On the other one I get:
“code”: 500,
“created”: “2019-10-04T13:17:54Z”,
“message”: “Build of instance a4eaa400-4fd2-4f08-a1b7-2f59c4776d83 aborted: Block Device Mapping is Invalid.”

If I try to boot from a volume I get a little more details:
Error: Error creating OpenStack server: Bad request with: [POST], error message: {“badRequest”: {“message”: “Invalid image metadata. Error: A list is required in field img_block_device_mapping, not a str”, “code”: 400}}

Any idea what is happening?


So it seems the snapshot that Packer is creating (in one az) is used when creating a new instance with the newly created image. I’ve tried with “image_type”: “image” but it’s the same.


I stumbled across this post, and also the issue you created on Packer’s GitHub. Sharing the link here for others who might be interested in how you resolved this.