Hi Phil,

Le 24/01/2014 14:13, Day, Phil a écrit :

HI Sylvain,

The change only makes the user have to supply a network ID if there is more than one private network available (and the issue there is that otherwise the assignment order in the Guest is random, which normally leads to all sorts of routing problems).


I'm sorry, but the query also includes shared (so, public) networks from the same tenant. See [1].

I'm running a standard Devstack with Neuron (built from trunk a couple of days ago), can see both a private and public network, and can boot VMs without having to supply any network info:



Indeed, that does work because Devstack is smart enough for creating the two networks with distinct tenant_ids. See [2] as a proof :-) If someone is building a private and a public network *on the same tenant*, it will fail to boot. Apologies if I was unclear.

So, the question is : what shall I do for changing this ? There are 2 options for me: 1. Add an extra param to _get_available_networks : shared=True and only return shared networks if the param is set to True (so we keep compatibility with all the calls) 2. Parse the nets dict here [3] to expurge the shared networks when len(nets) > 1. That's simple but potentially a performance issue, as it's O(N).

I would personnally vote for #1 and I'm ready to patch. By the way, the test case needs also to be updated [4].

-Sylvain


[1] https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L127
[2] : http://paste.openstack.org/show/61819/
[3] : https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L528 [4] : https://github.com/openstack/nova/blob/master/nova/tests/network/test_neutronv2.py#L1028
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to