Comment 3 for bug 1888722

Revision history for this message
John Garbutt (johngarbutt) wrote :

So this is what we do today, we use the sanitised instance.hostname:
https://github.com/openstack/nova/blob/da155cb495979726943806630eff1bed146b8605/nova/compute/api.py#L1817

You can see the sanitise logic here:
https://github.com/openstack/nova/blob/da155cb495979726943806630eff1bed146b8605/nova/utils.py#L351

I think we assume neutron does a double check here:
https://github.com/openstack/nova/blob/da155cb495979726943806630eff1bed146b8605/nova/network/neutron.py#L1624

It’s worth noting the api re-write added some validation here:
https://github.com/openstack/nova/blob/da155cb495979726943806630eff1bed146b8605/nova/api/openstack/compute/schemas/servers.py#L155
https://github.com/openstack/nova/blob/da155cb495979726943806630eff1bed146b8605/nova/api/validation/parameter_types.py#L268

Generally configuration options that alter API behaviour are rejected due to interoperability concerns. We already do some basic validation. This isn’t the simplest thing to do, but we are trying to be safe while keep backwards compatibility as the approach has evolved over the years.

It’s unclear to me what the likely problem is here, but hopefully the above will help others check my thinking on the topic.