I see two possible solutions:
- rollback port allocation on the server side (neutron) if the server can't respond to client i.e. client is disconnected,
- while retrying nova can first get the port for instance and use it if one exists.
Number of retries is according to CONF.network_allocate_retries param,
so as a workaround, you can set it to zero and recreate failed instances.
There is retry logic in nova compute manager (https:/ /github. com/openstack/ nova/blob/ master/ nova/compute/ manager. py#L1357)
and situation is possible
in which neutron created port but nova did not know about that (timeout for example).
I see two possible solutions:
- rollback port allocation on the server side (neutron) if the server can't respond to client i.e. client is disconnected,
- while retrying nova can first get the port for instance and use it if one exists.
Number of retries is according to CONF.network_ allocate_ retries param,
so as a workaround, you can set it to zero and recreate failed instances.