neoave / mrack

Multicloud use-case based multihost async provisioner for CIs and testing during development
Apache License 2.0
12 stars 14 forks source link

fix(Openstack): raise Validation error when req has undefined network type #154

Closed Tiboris closed 1 year ago

Tiboris commented 2 years ago

when bogus network appear in metadata requirement mrack continues and pass the network: None to the openstack server as requirement thus it fails This should fix the problems with networks that are not defined/supported in provisioning-config.yaml

Signed-off-by: Tibor Dudlák tdudlak@redhat.com

pvoborni commented 2 years ago

When I was looking deeper into this. I think that https://github.com/neoave/mrack/pull/117 introduced a regression where user cannot set network directly in metadata via: networks: my_osp_network entry. There reason is that move of the code caused that names = host.get("networks") on https://github.com/neoave/mrack/blob/master/src/mrack/providers/openstack.py#L186 will be always None as networks is not part of req. See https://github.com/neoave/mrack/blob/master/src/mrack/transformers/openstack.py#L65 It's because previously the host was host entry from metadata file. But in provider it is a req.

Wrt this patch. This kind of validation should be done in transformer Probably on line 50 https://github.com/neoave/mrack/blob/master/src/mrack/transformers/openstack.py#L50

Tiboris commented 2 years ago

I will have a look into that @pvoborni

Tiboris commented 1 year ago

This patch is no longer valid.