Comment 3 for bug 1696664

Revision history for this message
Matt Riedemann (mriedem) wrote :

FWIW we do preserve the order of requested networks on the boot request:

https://github.com/openstack/nova/blob/286cb904055eec3525fb61b2a0f93b14448bdd3e/nova/network/neutronv2/api.py#L350

During the actual network allocation this is where we build the list of networks, either via explicitly requested networks and/or via the port IDs requested:

https://github.com/openstack/nova/blob/286cb904055eec3525fb61b2a0f93b14448bdd3e/nova/network/neutronv2/api.py#L841

You can see where we don't put the port.network_id into the list of ordered_networks:

https://github.com/openstack/nova/blob/286cb904055eec3525fb61b2a0f93b14448bdd3e/nova/network/neutronv2/api.py#L578

used here:

https://github.com/openstack/nova/blob/286cb904055eec3525fb61b2a0f93b14448bdd3e/nova/network/neutronv2/api.py#L684

And those net_ids are what's sorted here:

https://github.com/openstack/nova/blob/286cb904055eec3525fb61b2a0f93b14448bdd3e/nova/network/neutronv2/api.py#L350

So yes we only preserve the order of requested networks, not networks and ports, or the networks associated with the ports.