[Openstack] How to achieve HA and Scalability for Neutron

Li Ma skywalker.nick at gmail.com
Wed Jan 8 15:29:29 UTC 2014


Hi jay,

I’m reading the script and just found it also works for dhcp agent.

Thanks for your reply. So helpful.

Best regards,
Nick Ma

2014-1-8 上午3:35于 "Jay Pipes" <jaypipes at gmail.com>写道:
>
> On Fri, 2014-01-03 at 18:33 +0800, Li Ma wrote:
> > > Right, the Neutron L3 agent is the only OpenStack service that is
> > > not stateless, and therefore you cannot use traditional
> > > load-balancing across a set of identical nodes.
> >
> > Hi jay, how about dhcp-agent? I've went through the bps of neutron
> > for icehouse release. There's no related topics on dhcp-agent.
> >
> > I wonder how to implement the same functionality of dhcp-agent.
>
> Hi Li, sorry for the delayed response!
>
> Technically, the DHCP agent itself does not maintain any state. Rather,
> the DHCP agent ensures that a DHCP server (dnsmasq) is running in the
> Linux network namespace and providing IP addresses in the tenant's
> subnet to the VM's vNIC MAC addresses. The dnsmasq process, running in
> the network namespace, *does* save state, though. Unless something has
> changed recently, I believe the default behavior of Neutron is to start
> a dnsmasq process within the tenant's network namespace on only *one*
> DHCP agent.
>
> However, it is definitely possible to instruct Neutron to place a
> dnsmasq process on multiple nodes with a DHCP agent servicing the node.
> In fact, in the Chef OpenStack Network cookbook [1] there is a tool
> written by Alan Meadows called neutron-ha-tool.py [2] that contains code
> [3] that queries Neutron for a list of DHCP agents, and then ensures
> that all DHCP agents provide a dnsmasq process for all networks. Check
> out the script and you'll see what I mean. We run it in a cron job and
> it ensures that if a node running a DHCP agent goes down, that there are
> other nodes providing the tenant subnet with DHCP servicing.
>
> All the best,
> -jay
>
> [1] https://github.com/stackforge/cookbook-openstack-network
> [2]
>
https://github.com/stackforge/cookbook-openstack-network/blob/master/files/default/neutron-ha-tool.py
> [3]
>
https://github.com/stackforge/cookbook-openstack-network/blob/master/files/default/neutron-ha-tool.py#L254
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140108/b98d2db4/attachment.html>


More information about the Openstack mailing list