octavia.amphorae.backends.health_daemon package

Submodules

octavia.amphorae.backends.health_daemon.health_daemon module

build_stats_message()[source]

Build a stats message based on retrieved listener statistics.

Example version 3 message without UDP (note that values are deltas, not absolutes):

{"id": "<amphora_id>",
 "seq": 67,
 "listeners": {
   "<listener_id>": {
     "status": "OPEN",
     "stats": {
       "tx": 0,
       "rx": 0,
       "conns": 0,
       "totconns": 0,
       "ereq": 0
     }
   }
 },
 "pools": {
     "<pool_id>:<listener_id>": {
       "status": "UP",
       "members": {
         "<member_id>": "no check"
       }
     }
 },
 "ver": 3
}
calculate_stats_deltas(listener_id, row)[source]
get_counters()[source]
get_counters_file()[source]
get_stats(stat_sock_file)[source]
list_sock_stat_files(hadir=None)[source]
persist_counters()[source]

Attempt to persist the latest statistics values

run_sender(cmd_queue)[source]

octavia.amphorae.backends.health_daemon.health_sender module

class UDPStatusSender[source]

Bases: object

dosend(obj)[source]
update(dest, port)[source]
round_robin_addr(addrinfo_list)[source]

octavia.amphorae.backends.health_daemon.status_message module

decode_obj(binary_array)[source]
encode_obj(obj)[source]
get_hmac(payload, key, hex=True)[source]

Get digest for the payload.

The hex param is for backward compatibility, so the package data sent from the existing amphorae can still be checked in the previous approach.

get_payload(envelope, key, hex=True)[source]
to_hex(byte_array)[source]
unwrap_envelope(envelope, key)[source]

A backward-compatible way to get data.

We may still receive package from amphorae that are using digest() instead of hexdigest()

wrap_envelope(obj, key, hex=True)[source]

Module contents