Add healthmonitor to Octavia

Healthmonitor is Octavia's main way to check on the status of the
octavia backend members, which makes it an important part of Octavia.

After any disruptive operation, if any of the backend member servers
would get an error, then without the healthmonitor it will be harder
to spot that, as the octavia member servers will hold the NO_MONITOR
operating_status, and traffic to the LB might fail.

With the healthmonitor, the octavia member servers will enter an
ERROR operating_status, and so will the pool and the LB.
Also, we could recognize the problem we had with the members in an
easier way.

This patch adds the octavia healthmonitor to Octavia's pool stack.

Change-Id: I29c7888e04bcc1fe4cedfdfb572cbf657f5e711a
This commit is contained in:
Omer 2021-07-06 14:50:25 +03:00 committed by Federico Ressi
parent 88fbfe6329
commit 9c3f0941fc
2 changed files with 47 additions and 4 deletions

View File

@ -125,6 +125,15 @@ class OctaviaPoolStackFixture(heat.HeatStackFixture):
hm_type = 'HTTP'
# healthmonitor attributes
hm_delay = 3
hm_max_retries = 4
hm_timeout = 3
hm_type = 'HTTP'
@property
def listener_id(self):
return self.listener.listener_id

View File

@ -13,15 +13,36 @@ parameters:
default: HTTP
description: Protocol used by the pool members
listener_id:
type: string
description: ID of the listener
# healthmonitor params
hm_delay:
type: number
default: 10
description: >
The minimum time in seconds between regular connections of the
member.
hm_max_retries:
type: number
default: 4
description: >
Number of permissible connection failures before changing the member
status to INACTIVE.
hm_timeout:
type: number
default: 3
description: >
Maximum number of seconds for a monitor to wait for a connection
to be established before it times out.
hm_type:
type: string
default: HTTP
description: Type of health-monitor
listener_id:
type: string
description: ID of the listener
resources:
pool:
type: OS::Octavia::Pool
@ -30,7 +51,20 @@ resources:
protocol: { get_param: pool_protocol }
listener: { get_param: listener_id }
monitor:
type: OS::Octavia::HealthMonitor
properties:
delay: { get_param: hm_delay }
type: { get_param: hm_type }
timeout: { get_param: hm_timeout }
max_retries: { get_param: hm_max_retries }
pool: { get_resource: pool }
outputs:
pool_id:
description: Pool ID
value: { get_resource: pool }
monitor_id:
description: Healthmonitor ID
value: { get_resource: monitor }