We still have a potential bug here. We create the vif object here:
https://github.com/openstack/nova/blob/92a388a1e34559b2ce69d31fdef996ff029495a6/nova/network/neutronv2/api.py#L838
but if updating the port's dns name fails, we aren't deleting the vif objects here:
https://github.com/openstack/nova/blob/92a388a1e34559b2ce69d31fdef996ff029495a6/nova/network/neutronv2/api.py#L847
Before re-raising the exception, or really if any port update fails in that loop because we could do something like:
1. create/update port1, create vif1, ok 2. create/update port2, fails - we deallocate port1 and port2 but not vif1
We still have a potential bug here. We create the vif object here:
https:/ /github. com/openstack/ nova/blob/ 92a388a1e34559b 2ce69d31fdef996 ff029495a6/ nova/network/ neutronv2/ api.py# L838
but if updating the port's dns name fails, we aren't deleting the vif objects here:
https:/ /github. com/openstack/ nova/blob/ 92a388a1e34559b 2ce69d31fdef996 ff029495a6/ nova/network/ neutronv2/ api.py# L847
Before re-raising the exception, or really if any port update fails in that loop because we could do something like:
1. create/update port1, create vif1, ok
2. create/update port2, fails - we deallocate port1 and port2 but not vif1