[Openstack] Neutron port-create command

Ageeleshwar Kandavelu Ageeleshwar.Kandavelu at csscorp.com
Thu Jan 9 06:39:16 UTC 2014


Thank you all for that was helpful. I also got some more information(to use agent/linux/interface.py) from neutron mailing list.


________________________________
From: Salvatore Orlando [sorlando at nicira.com]
Sent: Thursday, January 09, 2014 3:16 AM
To: Jonathan Proulx
Cc: Ageeleshwar Kandavelu; openstack at lists.openstack.org
Subject: Re: [Openstack] Neutron port-create command

Hi and apologies for the delay in the reply.

The neutron API operations define "logical entries", which pretty much means they just exist in the database.
The database provides agents information concerning how to wire these port.

If you look at the OVS/ML2 plugins, what does the 'magic' for nova instances, is actually the layer2 agent (aka ovs agent), which is able to wire any port plugged into the integration bridge, but does not plug ports itself - which, in my opinion, is conceptually correct.

When the interface does not belong to nova, but to a different service the process is similar, as mentioned by Jonathan.
The only difference is that the service itself configures the interface and performs IP configuration for it.
For instance the l3 agent:
  1) creates the devices for router interfaces
  2) assigns the corresponding neutron port-id setting ovs' external ids
  3) configures ip information, and if necessary iptables too
and then the ovs agent configures the ovs ports corresponding to these devices in order to ensure l2 connectivity.

Hope this helps,
Salvatore


On 8 January 2014 14:49, Jonathan Proulx <jon at jonproulx.com<mailto:jon at jonproulx.com>> wrote:
Interesting question.

I've not used neutron in that way, if you don't get any relevant
responses here I'd suggest reposting under a different subject like
"programatically binding to neutron ports" or something similar, you
may get a different set of readers, perhaps posting to the
openstack-dev list (if you do be sure to include '[Neutron]' in your
subject) as this is something typically done by services
(nuetron-dhcp-agent, neutron-l3-agent, nova-compute) rather than a
manual action by an operator or end user.

-Jon

On Tue, Jan 7, 2014 at 11:33 PM, Ageeleshwar Kandavelu
<Ageeleshwar.Kandavelu at csscorp.com<mailto:Ageeleshwar.Kandavelu at csscorp.com>> wrote:
> Lets say I do not want to launch nova instances that connect to a port. I want to introduce a service that binds to that port similar to dnsmasq. How do I make neutron perform this for me.
> ________________________________________
> From: jonathan.proulx at gmail.com<mailto:jonathan.proulx at gmail.com> [jonathan.proulx at gmail.com<mailto:jonathan.proulx at gmail.com>] on behalf of Jonathan Proulx [jon at jonproulx.com<mailto:jon at jonproulx.com>]
> Sent: Tuesday, January 07, 2014 8:33 PM
> To: Ageeleshwar Kandavelu
> Cc: openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>
> Subject: Re: [Openstack] Neutron port-create command
>
> On Tue, Jan 7, 2014 at 12:22 AM, Ageeleshwar Kandavelu
> <Ageeleshwar.Kandavelu at csscorp.com<mailto:Ageeleshwar.Kandavelu at csscorp.com>> wrote:
>> I am using neutron openvswitch plugin. I successfully created a port using
>> neutron port-create, but I do not see the newly created port when I do
>> 'ovs-vsctl show'. Is it that the port created is just a logical entity that
>> just exists only in DB and only when a VM is launched It is created in
>> openvswitch?
>
> port-create creates the port in the database, it's on a 'real thing'
> until it is associated with an instance.  At that point you can see it
> in ovs tools.
>
> Note you don't need to create ports if you associate in instance with
> a network it will dynamically create ports that are removed on shut
> down.  This is the more 'normal' use case.  I use port-create to get
> static MAC addresses for certain node locked software services (flexlm
> license server in my case), there are likely other uses and I wouldn't
> be surprised if using pre defined ports could shave a few seconds off
> start up times, but not personally certain about that.
>
> -Jon
> http://www.csscorp.com/common/email-disclaimer.php

_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

http://www.csscorp.com/common/email-disclaimer.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140109/36a409d8/attachment.html>


More information about the Openstack mailing list