Merge "Fixed VRRP nopreempt option"

This commit is contained in:
Zuul 2024-07-31 17:30:50 +00:00 committed by Gerrit Code Review
commit 47b8c360e9
4 changed files with 8 additions and 6 deletions

View File

@ -123,7 +123,6 @@ class KeepalivedJinjaTemplater:
peers_ips.append(amp.vrrp_ip)
return self.get_template(self.keepalived_template).render(
{'vrrp_group_name': loadbalancer.vrrp_group.vrrp_group_name,
'amp_role': amphora.role,
'amp_intf': amphora.vrrp_interface,
'amp_vrrp_id': amphora.vrrp_id,
'amp_priority': amphora.vrrp_priority,

View File

@ -21,7 +21,6 @@ vrrp_script check_script {
}
vrrp_instance {{ vrrp_group_name }} {
state {{ amp_role }}
interface {{ amp_intf }}
virtual_router_id {{ amp_vrrp_id }}
priority {{ amp_priority }}

View File

@ -71,7 +71,6 @@ class TestVRRPRestDriver(base.TestCase):
"}\n"
"\n"
"vrrp_instance TESTGROUP {\n"
" state MASTER\n"
" interface eth1\n"
" virtual_router_id 1\n"
" priority 100\n"
@ -124,7 +123,6 @@ class TestVRRPRestDriver(base.TestCase):
"}\n"
"\n"
"vrrp_instance TESTGROUP {\n"
" state MASTER\n"
" interface eth1\n"
" virtual_router_id 1\n"
" priority 100\n"
@ -170,7 +168,6 @@ class TestVRRPRestDriver(base.TestCase):
"}\n"
"\n"
"vrrp_instance TESTGROUP {\n"
" state MASTER\n"
" interface eth1\n"
" virtual_router_id 1\n"
" priority 100\n"
@ -220,7 +217,6 @@ class TestVRRPRestDriver(base.TestCase):
"}\n"
"\n"
"vrrp_instance TESTGROUP {\n"
" state MASTER\n"
" interface eth1\n"
" virtual_router_id 1\n"
" priority 100\n"

View File

@ -0,0 +1,8 @@
---
fixes:
- |
Fixed a bug with the `nopreempt` option in keepalived. The option didn't
work properly because the default role of the `MASTER` amphora was set.
Removing the default roles from the configuration files fixed that issue.
Now after a failover, the newly created amphora doesn't preempt the
`MASTER` role from the other amphora.