<div dir="ltr">Hi, <br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 12, 2013 at 6:47 AM, Robert Kukura <span dir="ltr"><<a href="mailto:rkukura@redhat.com" target="_blank">rkukura@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 07/11/2013 04:30 PM, Aaron Rosen wrote:<br>
> Hi,<br>
><br>
> I think we should revert this patch that was added here<br>
> (<a href="https://review.openstack.org/#/c/29767/" target="_blank">https://review.openstack.org/#/c/29767/</a>). What this patch does is when<br>
> nova-compute calls into quantum to create the port it passes in the<br>
> hostname on which the instance was booted on. The idea of the patch was<br>
> that providing this information would "allow hardware device vendors<br>
> management stations to allow them to segment the network in a more<br>
> precise manager (for example automatically trunk the vlan on the<br>
> physical switch port connected to the compute node on which the vm<br>
> instance was started)."<br>
><br>
> In my opinion I don't think this is the right approach. There are<br>
> several other ways to get this information of where a specific port<br>
> lives. For example, in the OVS plugin case the agent running on the<br>
> nova-compute node can update the port in quantum to provide this<br>
> information. Alternatively, quantum could query nova using the<br>
> port.device_id to determine which server the instance is on.<br>
><br>
> My motivation for removing this code is I now have the free cycles to<br>
> work on<br>
> <a href="https://blueprints.launchpad.net/nova/+spec/nova-api-quantum-create-port" target="_blank">https://blueprints.launchpad.net/nova/+spec/nova-api-quantum-create-port</a><br>
>  discussed here<br>
> (<a href="http://lists.openstack.org/pipermail/openstack-dev/2013-May/009088.html" target="_blank">http://lists.openstack.org/pipermail/openstack-dev/2013-May/009088.html</a>)  .<br>
> This was about moving the quantum port creation from the nova-compute<br>
> host to nova-api if a network-uuid is passed in. This will allow us to<br>
> remove all the quantum logic from the nova-compute nodes and<br>
> simplify orchestration.<br>
><br>
> Thoughts?<br>
<br>
</div></div>Aaron,<br>
<br>
The ml2-portbinding BP I am currently working on depends on nova setting<br>
the binding:host_id attribute on a port before accessing<br>
binding:vif_type. The ml2 plugin's MechanismDrivers will use the<br>
binding:host_id with the agents_db info to see what (if any) L2 agent is<br>
running on that host, or what other networking mechanisms might provide<br>
connectivity for that host. Based on this, the port's binding:vif_type<br>
will be set to the appropriate type for that agent/mechanism.<br>
<br>
When an L2 agent is involved, the associated ml2 MechanismDriver will<br>
use the agent's interface or bridge mapping info to determine whether<br>
the agent on that host can connect to any of the port's network's<br>
segments, and select the specific segment (network_type,<br>
physical_network, segmentation_id) to be used. If there is no<br>
connectivity possible on the host (due to either no L2 agent or other<br>
applicable mechanism, or no mapping for any of the network's segment's<br>
physical_networks), the ml2 plugin will set the binding:vif_type<br>
attribute to BINDING_FAILED. Nova will then be able to gracefully put<br>
the instance into an error state rather than have the instance boot<br>
without the required connectivity.<br>
<br>
I don't see any problem with nova creating the port before scheduling it<br>
to a specific host, but the binding:host_id needs to be set before the<br>
binding:vif_type attribute is accessed. Note that the host needs to be<br>
determined before the vif_type can be determined, so it is not possible<br>
to rely on the agent discovering the VIF, which can't be created until<br>
the vif_type is determined.<br></blockquote><div><br></div><div style>So what your saying is the current workflow is this: nova-compute creates a port in quantum passing in the host-id (which is the hostname of the compute host). Now quantum looks in the agent table in it's database to determine the VIF type that should be used based on the agent that is running on the nova-compute node? My question would be why the nova-compute node doesn't already know which VIF_TYPE it should be using? </div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Back when the port binding extension was originally being hashed out, I<br>
had suggested using an explicit bind() operation on port that took the<br>
host_id as a parameter and returned the vif_type as a result. But the<br>
current attribute-based approach was chosen instead. We could consider<br>
adding a bind() operation for the next neutron API revision, but I don't<br>
see any reason the current attribute-based binding approach cannot work<br>
for now.<br>
<br>
-Bob<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Best,<br>
><br>
> Aaron<br>
><br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
><br>
<br>
</div></div></blockquote></div><br></div></div>