Re: [openstack-dev] [Nova] Why Nova should fail to boot if there are only one private network and one public network ?
To: OpenStack Development Mailing List Subject: [openstack-dev] [Nova] Why Nova should fail to boot if there are only one private network and one public network ? Hi, I filed a bug [1] a while ago about the impact of a review [2] which now prevents Nova to boot instances if there are two available networks within Neutron. As a side effect, users now need to pass the nic ID on the nova boot command even for simple setups with only one private network (and subnet) and one public net (with one subnet) IMHO, we should segragate public from private networks and only allow to count private networks. This would have at least the benefit for devstack users and begineers to not wonder why it should give a nic hint for properly boot his VM. Thoughts, before I'm submitting a review ? -Sylvain [1] https://bugs.launchpad.net/nova/+bug/1227506 [2] https://review.openstack.org/#/c/33996/ ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [Nova] Why Nova should fail to boot if there are only one private network and one public network ?
Hi Sylvain, Thanks for the clarification, I'd missed that it was where the public network belonged to the same tenant (it's not a use case we run with). So I can see that option [1] would make the validation work by (presumably) not including the shared network in the list of networks, but looking further into the code allocate_for_instance() uses the same call to decide which networks it needs to create ports for, and from what I can see it would attach the instance to both networks. https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L244 However that feels like the same problem that the patch was originally trying to fix, in that the network order isn't controlled by the user, and many Guest OS's will only configure the first NIC they are presented with. The idea was that in this case the user needs to explicitly specify the networks in the order that they want them to be attached to. Am I still missing something ? Cheers, Phil From: Sylvain Bauza [mailto:sylvain.ba...@bull.net] Sent: 24 January 2014 14:02 To: OpenStack Development Mailing List (not for usage questions) Cc: Day, Phil Subject: Re: [openstack-dev] [Nova] Why Nova should fail to boot if there are only one private network and one public network ? 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
Re: [openstack-dev] [Nova] Why Nova should fail to boot if there are only one private network and one public network ?
Hi Phil, 2014/1/24 Day, Phil philip@hp.com So I can see that option [1] would make the validation work by (presumably) not including the shared network in the list of networks, but looking further into the code allocate_for_instance() uses the same call to decide which networks it needs to create ports for, and from what I can see it would attach the instance to both networks. https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L244 That's exactly the reason I think it's necessary to add the parameter 'shared' with a default value set to True, so any unidentified call would still get the same behaviour without modifying the call itself. On that case, I just need to amend the call placed in validate_networks(). However that feels like the same problem that the patch was originally trying to fix, in that the network order isn’t controlled by the user, and many Guest OS’s will only configure the first NIC they are presented with. The idea was that in this case the user needs to explicitly specify the networks in the order that they want them to be attached to. Am I still missing something ? The main question is : should we allocate a port bound to a public network ? My first opinion is no, but I'm not an expert. I'll propose a patch for the change, let's discuss it on the review itself. Thanks, -Sylvain ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[openstack-dev] [Nova] Why Nova should fail to boot if there are only one private network and one public network ?
Hi, I filed a bug [1] a while ago about the impact of a review [2] which now prevents Nova to boot instances if there are two available networks within Neutron. As a side effect, users now need to pass the nic ID on the nova boot command even for simple setups with only one private network (and subnet) and one public net (with one subnet) IMHO, we should segragate public from private networks and only allow to count private networks. This would have at least the benefit for devstack users and begineers to not wonder why it should give a nic hint for properly boot his VM. Thoughts, before I'm submitting a review ? -Sylvain [1] https://bugs.launchpad.net/nova/+bug/1227506 [2] https://review.openstack.org/#/c/33996/ ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev