Enable automatic failover of l3 routers
When l3-agent is not working on a node, neutron server will automatically move its routers to another l3-agent. Neutron server detects l3-agent outage after 1-2 minutes, neutron-l3-agent is now monitored every 30s by pacemaker which will restart the service in case of a failure (this should cover most of outages). If outage is longer (e.g. networking issue) and routers are reassigned to another node, l3-agent will clean up routers from local node when it restarts (or when it can communicate with neutron server again). This solution is not perfect and doesn't cover some edge situations described here: https://bugs.launchpad.net/neutron/+bug/1174591 But I think this still improves current state of l3-agent HA. This should not be needed once neutron l3 agent HA patch is merged (I83f2a5d2af42164c42773b385ba7b00872eed54e). Change-Id: Ifd8d73b3b1a5b13095e87683449aa4cab7579d3e
This commit is contained in:
parent
42ffac22e1
commit
dbc1634711
|
@ -2,4 +2,5 @@ neutron
|
|||
neutron-dhcp-agent
|
||||
neutron-openvswitch-agent
|
||||
os-refresh-config
|
||||
pacemaker
|
||||
pkg-map
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
os-svc-enable -n neutron-metadata-agent
|
||||
os-svc-enable -n neutron-l3-agent
|
||||
|
||||
os-svc-restart -n neutron-metadata-agent
|
||||
os-svc-restart -n neutron-l3-agent
|
||||
|
||||
# this ensures that neutron-l3-agent and neutron-metadata-agent services
|
||||
# will be monitored by pacemaker on all nodes.
|
||||
# Because allow_automatic_l3agent_failover is enabled, we want
|
||||
# to make sure that if l3-agent service fails it's started again by
|
||||
# pacemaker. If outage is longer and l3 routers are moved to other
|
||||
# node meantime, l3-agent will clean up routers on local node when
|
||||
# started again.
|
||||
# TODO: it would be cleaner to do service restart above by pacemaker
|
||||
# command, but it's difficult to restart service on single node only
|
||||
pcmk-service-create -c -n neutron-metadata-agent
|
||||
pcmk-service-create -c -n neutron-l3-agent
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
## It has been enabled for passthrough configuration support.
|
||||
|
||||
[DEFAULT]
|
||||
|
||||
{{#neutron.verbose}}
|
||||
# Print more verbose output (set logging level to INFO instead
|
||||
# of default WARNING level). (boolean value)
|
||||
|
@ -15,6 +14,8 @@ verbose={{neutron.verbose}}
|
|||
debug={{neutron.debug}}
|
||||
{{/neutron.debug}}
|
||||
|
||||
allow_automatic_l3agent_failover = True
|
||||
|
||||
lock_path = /var/run/neutron/lock
|
||||
|
||||
auth_strategy = keystone
|
||||
|
|
Loading…
Reference in New Issue