[UDP] Fix failed member always in DRAIN status

1. Remove 'inhibit_on_failure' option from realserver configuration block.
   Then when the member is failed which means the MISC_CHECK is failed,
   the amp agent can not get the member info from kernel ip_vs file, and
   it will return status DOWN to health manger, then the member status
   will be ERROR, and its associated pool and loadbalancer will be in
   DEGRADED status.

Alternative:
Using notify_up/notify_down to write the status into a member specific
file, then we can read the member status from that file directly.

Change-Id: I940681b8109b05334ebb5befc58b43f08d2a1148
Story: 2003198
Task: 23354
changes/11/588511/7
ZhaoBo 4 years ago committed by Michael Johnson
parent cc97397d1c
commit a166c89b64
  1. 1
      octavia/common/jinja/lvs/templates/macros.j2
  2. 4
      octavia/tests/unit/amphorae/backends/utils/test_keepalivedlvs_query.py
  3. 6
      octavia/tests/unit/common/jinja/lvs/test_lvs_jinja_cfg.py

@ -47,7 +47,6 @@ MISC_CHECK {
# Configuration for Member {{ member.id }}
real_server {{ member.address }} {{ member.protocol_port }} {
weight {{ member.weight }}
inhibit_on_failure
{% if listener.connection_limit %}
uthreshold {{ listener.connection_limit }}
{% endif %}

@ -58,14 +58,12 @@ CFG_FILE_TEMPLATE_v4 = (
" # Configuration for Member %(member_id1)s\n"
" real_server 10.0.0.25 2222 {\n"
" weight 3\n"
" inhibit_on_failure\n"
" persistence_timeout 5\n"
" persistence_granularity 255.0.0.0\n\n"
" }\n\n"
" # Configuration for Member %(member_id2)s\n"
" real_server 10.0.0.35 3333 {\n"
" weight 2\n"
" inhibit_on_failure\n"
" persistence_timeout 5\n"
" persistence_granularity 255.0.0.0\n\n"
" }\n\n"
@ -82,12 +80,10 @@ CFG_FILE_TEMPLATE_v6 = (
" # Configuration for Member %(member_id1)s\n"
" real_server fd79:35e2:9963:0:f816:3eff:feca:b7bf 2222 {\n"
" weight 3\n"
" inhibit_on_failure\n"
" }\n\n"
" # Configuration for Member %(member_id2)s\n"
" real_server fd79:35e2:9963:0:f816:3eff:fe9d:94df 3333 {\n"
" weight 2\n"
" inhibit_on_failure\n"
" }\n\n"
"}")

@ -53,7 +53,6 @@ class TestLvsCfg(base.TestCase):
" # Configuration for Member sample_member_id_1\n"
" real_server 10.0.0.99 82 {\n"
" weight 13\n"
" inhibit_on_failure\n"
" uthreshold 98\n"
" delay_before_retry 31\n"
" retry 3\n"
@ -66,7 +65,6 @@ class TestLvsCfg(base.TestCase):
" # Configuration for Member sample_member_id_2\n"
" real_server 10.0.0.98 82 {\n"
" weight 13\n"
" inhibit_on_failure\n"
" uthreshold 98\n"
" delay_before_retry 31\n"
" retry 3\n"
@ -103,7 +101,6 @@ class TestLvsCfg(base.TestCase):
" # Configuration for Member sample_member_id_1\n"
" real_server 10.0.0.99 82 {\n"
" weight 13\n"
" inhibit_on_failure\n"
" uthreshold 98\n"
" delay_before_retry 31\n"
" retry 3\n"
@ -116,7 +113,6 @@ class TestLvsCfg(base.TestCase):
" # Configuration for Member sample_member_id_2\n"
" real_server 10.0.0.98 82 {\n"
" weight 13\n"
" inhibit_on_failure\n"
" uthreshold 98\n"
" delay_before_retry 31\n"
" retry 3\n"
@ -152,7 +148,6 @@ class TestLvsCfg(base.TestCase):
" # Configuration for Member sample_member_id_1\n"
" real_server 10.0.0.99 82 {\n"
" weight 13\n"
" inhibit_on_failure\n"
" uthreshold 98\n"
" delay_before_retry 31\n"
" retry 3\n"
@ -165,7 +160,6 @@ class TestLvsCfg(base.TestCase):
" # Configuration for Member sample_member_id_2\n"
" real_server 10.0.0.98 82 {\n"
" weight 13\n"
" inhibit_on_failure\n"
" uthreshold 98\n"
" delay_before_retry 31\n"
" retry 3\n"

Loading…
Cancel
Save