image properties priority

asked 2019-01-23 12:10:42 -0600

fjamet gravatar image

Hello fellow openstackers,

i'm facing an issue on my Openstack POC, and i hope some of you might have the answer i'm looking for...

My Openstack infrastructure is based on vmware VMs, running centos7 and deployed via openstack-ansible, i have tweaked the nova, glance and cinder node so they can communicate with my vCenter. I can now deploy instances that are created as VMware VMs.

I 'm currently trying to make use of the magnum project, the aim would then be to deploy a kubernetes cluster through openstack, as VMware VMs. Here is the problem: 1- for vmware to be able to use glance images, those images must have vmware_ostype property set, so i did and assuming you provide a valid vmware guestId as vmware ostype, instances got deployed without any problems.

2-To be able to use an image with magnum, the image must have the os_distro property set with either fedora-atomic, coreos or ubuntu.

3-I don't want to use ubuntu, for personal reason i want to use fedora-atomic or coreos because i wan't a kubernetes cluster.

Seems easy, right? Just add the os_distro property to a working fedora-atomic image... And i did so...

the major problems is that now, i get an error form vCenter saying "A specified parameter was not correct: configSpec.guestId". That's not supposed to be like this because the vmware_ostype is a valid vmwre guestId.
With a little bit of digging i discovered that the os_distro property seems to override the vmware_ostype property.

Proof; when trying to create a fedora-atomic image with a valid vmware_ostype (centos7_64Guest) it works like a charm, when adding the os_distro property (fedora-atomic), instance creation fails just at the end (volume creation goes well, but instance get created and the deleted).

this what i get from the cinder logs at block device mapping creation:

2019-01-23 15:55:24.779 21944 INFO cinder.volume.flows.manager.create_volume [req-4eefd3d7-99c8-4353-b4f3-f8c1211585ee d5aa8b98d49e4739bcd5e881b5942e31 a6c9366cdbde4e50a1b2d4abd46df8dc - default default] Volume ca4e02a4-2512-4cf2-927a-77074df0d50d: being created as image with specification: {'status': u'creating', 'image_location': (None, [{u'url': u'vsphere://', u'metadata': {}}]), 'volume_size': 10, 'volume_name': u'volume-ca4e02a4-2512-4cf2-927a-77074df0d50d', 'image_id': u'e81079ac-5e8f-4701-9b9f-6c7639ae7080', 'image_service': <cinder.image.glance.GlanceImageService object at 0x7f64e4be0ad0>, 'image_meta': {u'container_format': u'bare', u'min_ram': 0, u'locations': [{u'url': u'vsphere://', u'metadata': {}}], u'file': u'/v2/images/e81079ac-5e8f-4701-9b9f-6c7639ae7080/file', u'owner': u'a6c9366cdbde4e50a1b2d4abd46df8dc', u'id': u'e81079ac-5e8f-4701-9b9f-6c7639ae7080', u'size': 1654718464, u'disk_format': u'vmdk', u'os_hash_algo': u'sha512', u'status': u'active', u'tags': [], u'visibility': u'shared', u'updated_at': datetime.datetime(2019, 1, 23, 14, 41, 43, tzinfo=<iso8601.Utc>), u'min_disk': 0, u'virtual_size': None, 'properties': {**u'vmware_ostype': u'centos7_64Guest', u'os_distro': u'fedora-atomic'**, u'vmware_disktype': u'sparse', u'hypervisor_type': u'vmware'}, u'name': u'Fedora-AtomicHost-29-x64-cent-distro', u'checksum': u'0347948ab7e1166118d74c1e0e2ffb19', u'created_at': datetime.datetime(2019, 1, 23, 13, 40, 40, tzinfo=<iso8601.Utc>), u'os_hidden': False, u'protected': False, u ...
edit retag flag offensive close merge delete