Ask Your Question
0

Multiple L3 Agents - Failed to bind port on host

asked 2014-07-05 07:54:42 -0500

Mathias Ewald gravatar image

updated 2014-07-05 08:07:47 -0500

Hi, I was struggling with multiple L3 Agents to support multiple external networks for a while now when I hit an error message I dont understand. But here my configuration first:

on the controller node:

root@controller:~# cat /etc/hosts
127.0.0.1       localhost

192.168.10.1            r1.lab.invalid                r1
192.168.10.10           controller.lab.invalid        controller
192.168.10.11           neutron-net.lab.invalid       neutron-net
192.168.10.11           neutron-net-l3-1.lab.invalid  neutron-net-l3-1
192.168.10.11           neutron-net-l3-2.lab.invalid  neutron-net-l3-2
192.168.10.100          node00.lab.invalid            node00


# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

root@controller:~# neutron net-list
+--------------------------------------+---------+-------------------------------------------------------+
| id                                   | name    | subnets                                               |
+--------------------------------------+---------+-------------------------------------------------------+
| f55ded23-08b1-4671-850a-50f134be406d | public1 | 88ccce32-d1d9-43f5-9160-733b4c33281f 88.198.249.48/28 |
| faaad07e-0466-44c2-b457-8de3876b82a2 | public0 | e36a335c-c265-4b11-96c3-07a0ee3abf0e 88.198.244.96/29 |
+--------------------------------------+---------+-------------------------------------------------------+

on my network node:

root@neutron-net:~# cat /etc/hosts
127.0.0.1       localhost

192.168.10.1            r1.lab.invalid                r1
192.168.10.10           controller.lab.invalid        controller
192.168.10.11           neutron-net.lab.invalid       neutron-net
192.168.10.11           neutron-net-l3-1.lab.invalid  neutron-net-l3-1
192.168.10.11           neutron-net-l3-2.lab.invalid  neutron-net-l3-2
192.168.10.100          node00.lab.invalid            node00


# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

root@neutron-net:~# cat /etc/neutron/l3_agent.ini | grep -v -E "^#" | grep -v -E "^\s*$"
[DEFAULT]
verbose = True
host = neutron-net-l3-1
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
use_namespaces = True
gateway_external_network_id = faaad07e-0466-44c2-b457-8de3876b82a2
handle_internal_only_routers = True
external_network_bridge = br-ex

root@neutron-net:~# cat /etc/neutron/l3_agent2.ini | grep -v -E "^#" | grep -v -E "^\s*$"
[DEFAULT]
verbose = True
host = neutron-net-l3-2
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
use_namespaces = True
gateway_external_network_id = f55ded23-08b1-4671-850a-50f134be406d
handle_internal_only_routers = False
external_network_bridge = br-ex1
root@neutron-net:~#

root@neutron-net:~# cat /etc/init/neutron-l3-agent.conf 
# vim:set ft=upstart ts=2 et:
description "Neutron L3 Agent"
author "Chuck Short <zulcss@ubuntu.com>"

start on runlevel [2345]
stop on runlevel [!2345]

respawn

chdir /var/run

pre-start script
  mkdir -p /var/run/neutron
  chown neutron:root /var/run/neutron
  # Check to see if openvswitch plugin in use by checking
  # status of cleanup upstart configuration
  if status neutron-ovs-cleanup; then
    start wait-for-state WAIT_FOR=neutron-ovs-cleanup WAIT_STATE=running WAITER=neutron-l3-agent
  fi
end script

exec start-stop-daemon --start --chuid neutron --exec /usr/bin/neutron-l3-agent -- \
  --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent.ini \
  --config-file=/etc/neutron/fwaas_driver.ini --log-file=/var/log/neutron/l3-agent.log

root@neutron-net:~# cat /etc/init/neutron-l3-agent2.conf 
# vim:set ft=upstart ts=2 et:
description "Neutron L3 Agent 2"
author "Chuck Short <zulcss@ubuntu.com>"

start on runlevel [2345]
stop on runlevel [!2345]

respawn

chdir /var/run

pre-start script
  mkdir -p /var/run/neutron
  chown neutron:root /var/run/neutron
  # Check to see if openvswitch plugin in use by checking
  # status of cleanup upstart configuration
  if status neutron-ovs-cleanup; then
    start wait-for-state WAIT_FOR=neutron-ovs-cleanup WAIT_STATE=running WAITER=neutron-l3-agent2
  fi
end script

exec start-stop-daemon --start --chuid neutron --exec /usr/bin/neutron-l3-agent -- \
  --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent2.ini \
  --config-file=/etc/neutron/fwaas_driver.ini --log-file=/var/log ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-07-08 13:32:08 -0500

kfox gravatar image

updated 2014-07-08 13:37:06 -0500

I was using multiple l3 agents on one host and it worked for a while and then broke during a minor rpm update. After hours of fighting it, I gave up and switched over to using the new support for using one agent with multiple networks. I had to fight with it too since it isn't very well documented. After I figured out the right options, its been working great ever since. The tricks were to:

  • Explicitly put in these two lines in /etc/neutron/l3_agent.ini (= with no values after). The defaults don't work.

gateway_external_network_id =

external_network_bridge =

  • In /etc/neutron/plugins/ml2/ml2_conf.ini ensure you have the flat type driver loaded, and you have a mapping setup for the stuff that use to be in the l3.ini's. bridge_mappings = physnet1:br-eth0,physnet2:br-eth1, etc

  • Ensure you have a physnet stuff setup on the neutron external networks.

After switching, I had to poke at the database to get the networks switched over to the new l3 agent. Not sure an easy way around that.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-07-05 07:54:42 -0500

Seen: 935 times

Last updated: Jul 08 '14