[sdk] empty image dict if volume is attached
hi there, openstack instances that have a cinder volume attached as their primary block device won't return any information regarding the image that has been used during their creation: openstack server show -f shell -c image -c volumes_attached test1 image="" volumes_attached="id='c0650208-f39c-4427-a73b-e1aa88531016'" vs. openstack server show -f shell -c image -c volumes_attached test2 image="Ubuntu 20.04 LTS (5cf81857-0dba-497e-ad9a-23a88dd97506)" volumes_attached="" as a result, this information won't be available in ansible inventories created with the relevant plugin¹ either … this is unfortunate, since i need to set certain variables for ansible based on the image resp. the operating system an instance uses. now, the necessary information seems to be available as a volume's metadata: openstack volume show -f shell -c volume_image_metadata c0650208-f39c-4427-a73b-e1aa88531016 volume_image_metadata="{'signature_verified': 'False', 'hw_rng_model': 'virtio', 'hypervisor_type': 'qemu', 'os_distro': 'centos', 'os_type': 'linux', 'image_id': '1572c62f-438c-4a70-be84-973fef0d3c77', 'image_name': 'CentOS 8', 'checksum': 'd89eb49f2c264d29225cecf2b6c83322', 'container_format': 'bare', 'disk_format': 'qcow2', 'min_disk': '10', 'min_ram': '1024', 'size': '716176896'}" … would it be a good idea to extend openstacksdk to look for image_name in the volumes attached to an instance and use this value for the image key? thank you very much & with kind regards, t. ¹ - https://docs.ansible.com/ansible/latest/collections/openstack/cloud/openstac... , this plugin makes use of openstacksdk
hi there, On 10/9/20 2:50 PM, thoralf schulze wrote:
openstack instances that have a cinder volume attached as their primary block device won't return any information regarding the image that has been used during their creation: […] … would it be a good idea to extend openstacksdk to look for image_name in the volumes attached to an instance and use this value for the image key?
before i start hacking together something: is this behaviour intended, and will implementing the change outlined above break anything else? thank you very much & with kind regards, t.
participants (1)
-
thoralf schulze