-
Notifications
You must be signed in to change notification settings - Fork 20
Description
This is a weird one, it may be an Openstack issue and not an issue with this driver.
- Set
image_volume_cache_enabled = Truefor this driver and start with no images currently cached. - Launch an instance so it creates a volume of the provided image, i.e
resource "openstack_compute_instance_v2" "boot-from-volume" { name = "boot-from-volume" flavor_id = "1" key_pair = "mykey" security_groups = ["default"] config_drive = true block_device { uuid = "5cb160aa-5e5f-46e8-a217-a30135bed695" source_type = "image" volume_size = 50 boot_index = 0 volume_type = "ixsystems-iscsi" destination_type = "volume" delete_on_termination = true }
- Delete the instance
The volume that was made for the instance will get stuck in Error Deleting, see screenshot of the instance volume + the image cache volume in horizon + in truenas UI:
In the truenas UI I see there is a snapshot on the instance volume.
Per testing, this snapshot gets created when the image is cached, then is used to create a zvol for the cached image.
This seems a bit backwards to me. I would expect the volume to be created in openstack, zvol created in truenas which is the cached image, snapshot taken of that, then a new zvol created from that snapshot for the instance disk. But it seems to be taking a snapshot of the instance's volume to cache the image.
If I delete the image-5cb160aa-5e5f-46e8-a217-a30135bed695 volume, then reset the sate of 9f6a6172-27ba-4afc-ad02-28c826d8ec86 then delete 9f6a6172-27ba-4afc-ad02-28c826d8ec86 everything works fine. So I beleive it's due to this snapshot on the instance volume due to the image cache.


