Skip to content

Commit 47b8c36

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fixed VRRP nopreempt option"
2 parents c9b15db + 911faf2 commit 47b8c36

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

octavia/amphorae/drivers/keepalived/jinja/jinja_cfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ def build_keepalived_config(self, loadbalancer, amphora, amp_net_config):
123123
peers_ips.append(amp.vrrp_ip)
124124
return self.get_template(self.keepalived_template).render(
125125
{'vrrp_group_name': loadbalancer.vrrp_group.vrrp_group_name,
126-
'amp_role': amphora.role,
127126
'amp_intf': amphora.vrrp_interface,
128127
'amp_vrrp_id': amphora.vrrp_id,
129128
'amp_priority': amphora.vrrp_priority,

octavia/amphorae/drivers/keepalived/jinja/templates/keepalived_base.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ vrrp_script check_script {
2121
}
2222

2323
vrrp_instance {{ vrrp_group_name }} {
24-
state {{ amp_role }}
2524
interface {{ amp_intf }}
2625
virtual_router_id {{ amp_vrrp_id }}
2726
priority {{ amp_priority }}

octavia/tests/unit/amphorae/drivers/keepalived/jinja/test_jinja_cfg.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def setUp(self):
7171
"}\n"
7272
"\n"
7373
"vrrp_instance TESTGROUP {\n"
74-
" state MASTER\n"
7574
" interface eth1\n"
7675
" virtual_router_id 1\n"
7776
" priority 100\n"
@@ -124,7 +123,6 @@ def setUp(self):
124123
"}\n"
125124
"\n"
126125
"vrrp_instance TESTGROUP {\n"
127-
" state MASTER\n"
128126
" interface eth1\n"
129127
" virtual_router_id 1\n"
130128
" priority 100\n"
@@ -170,7 +168,6 @@ def setUp(self):
170168
"}\n"
171169
"\n"
172170
"vrrp_instance TESTGROUP {\n"
173-
" state MASTER\n"
174171
" interface eth1\n"
175172
" virtual_router_id 1\n"
176173
" priority 100\n"
@@ -220,7 +217,6 @@ def setUp(self):
220217
"}\n"
221218
"\n"
222219
"vrrp_instance TESTGROUP {\n"
223-
" state MASTER\n"
224220
" interface eth1\n"
225221
" virtual_router_id 1\n"
226222
" priority 100\n"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
fixes:
3+
- |
4+
Fixed a bug with the `nopreempt` option in keepalived. The option didn't
5+
work properly because the default role of the `MASTER` amphora was set.
6+
Removing the default roles from the configuration files fixed that issue.
7+
Now after a failover, the newly created amphora doesn't preempt the
8+
`MASTER` role from the other amphora.

0 commit comments

Comments
 (0)