Merge "Adds garp_master_repeat and garp_master_refresh to keepalived.conf"
This commit is contained in:
commit
ab9ef51ca1
@ -32,7 +32,8 @@ PRIMARY_VIP_RANGE_SIZE = 24
|
||||
# TODO(amuller): Use L3 agent constant when new constants module is introduced.
|
||||
FIP_LL_SUBNET = '169.254.30.0/23'
|
||||
KEEPALIVED_SERVICE_NAME = 'keepalived'
|
||||
|
||||
GARP_MASTER_REPEAT = 5
|
||||
GARP_MASTER_REFRESH = 10
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -148,7 +149,9 @@ class KeepalivedInstance(object):
|
||||
|
||||
def __init__(self, state, interface, vrouter_id, ha_cidrs,
|
||||
priority=HA_DEFAULT_PRIORITY, advert_int=None,
|
||||
mcast_src_ip=None, nopreempt=False):
|
||||
mcast_src_ip=None, nopreempt=False,
|
||||
garp_master_repeat=GARP_MASTER_REPEAT,
|
||||
garp_master_refresh=GARP_MASTER_REFRESH):
|
||||
self.name = 'VR_%s' % vrouter_id
|
||||
|
||||
if state not in VALID_STATES:
|
||||
@ -161,6 +164,8 @@ class KeepalivedInstance(object):
|
||||
self.nopreempt = nopreempt
|
||||
self.advert_int = advert_int
|
||||
self.mcast_src_ip = mcast_src_ip
|
||||
self.garp_master_repeat = garp_master_repeat
|
||||
self.garp_master_refresh = garp_master_refresh
|
||||
self.track_interfaces = []
|
||||
self.vips = []
|
||||
self.virtual_routes = KeepalivedInstanceRoutes()
|
||||
@ -254,7 +259,9 @@ class KeepalivedInstance(object):
|
||||
' state %s' % self.state,
|
||||
' interface %s' % self.interface,
|
||||
' virtual_router_id %s' % self.vrouter_id,
|
||||
' priority %s' % self.priority]
|
||||
' priority %s' % self.priority,
|
||||
' garp_master_repeat %s' % self.garp_master_repeat,
|
||||
' garp_master_refresh %s' % self.garp_master_refresh]
|
||||
|
||||
if self.nopreempt:
|
||||
config.append(' nopreempt')
|
||||
|
@ -197,6 +197,8 @@ class L3AgentTestFramework(base.BaseSudoTestCase):
|
||||
interface %(ha_device_name)s
|
||||
virtual_router_id 1
|
||||
priority 50
|
||||
garp_master_repeat 5
|
||||
garp_master_refresh 10
|
||||
nopreempt
|
||||
advert_int 2
|
||||
track_interface {
|
||||
|
@ -115,6 +115,8 @@ class KeepalivedConfTestCase(base.BaseTestCase,
|
||||
interface eth0
|
||||
virtual_router_id 1
|
||||
priority 50
|
||||
garp_master_repeat 5
|
||||
garp_master_refresh 10
|
||||
advert_int 5
|
||||
authentication {
|
||||
auth_type AH
|
||||
@ -141,6 +143,8 @@ vrrp_instance VR_2 {
|
||||
interface eth4
|
||||
virtual_router_id 2
|
||||
priority 50
|
||||
garp_master_repeat 5
|
||||
garp_master_refresh 10
|
||||
mcast_src_ip 224.0.0.1
|
||||
track_interface {
|
||||
eth4
|
||||
@ -249,6 +253,8 @@ class KeepalivedInstanceTestCase(base.BaseTestCase,
|
||||
interface eth0
|
||||
virtual_router_id 1
|
||||
priority 50
|
||||
garp_master_repeat 5
|
||||
garp_master_refresh 10
|
||||
advert_int 5
|
||||
authentication {
|
||||
auth_type AH
|
||||
@ -272,6 +278,8 @@ vrrp_instance VR_2 {
|
||||
interface eth4
|
||||
virtual_router_id 2
|
||||
priority 50
|
||||
garp_master_repeat 5
|
||||
garp_master_refresh 10
|
||||
mcast_src_ip 224.0.0.1
|
||||
track_interface {
|
||||
eth4
|
||||
@ -294,6 +302,8 @@ vrrp_instance VR_2 {
|
||||
interface eth0
|
||||
virtual_router_id 1
|
||||
priority 50
|
||||
garp_master_repeat 5
|
||||
garp_master_refresh 10
|
||||
virtual_ipaddress {
|
||||
169.254.0.1/24 dev eth0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user