Skip to content

Commit

Permalink
feat: new variable to control Kafka URP topics retries
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb committed Jan 13, 2025
1 parent caa035e commit 275b6eb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/VARIABLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5702,6 +5702,14 @@ Default: 20

***

### kafka_broker_health_check_urp_topics_retries

Number of retries while waiting for no URP topics during Kafka Health Checks.

Default: 15

***

### kafka_broker_jmxexporter_startup_delay

Time in seconds to wait before JMX exporter starts serving metrics. Any requests within the delay period will result in an empty metrics set.
Expand Down
3 changes: 3 additions & 0 deletions roles/kafka_broker/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ kafka_broker_sysctl_file: /usr/lib/sysctl.d/sysctl.conf
### Time in seconds to wait before starting Kafka Health Checks.
kafka_broker_health_check_delay: 20

### Number of retries while waiting for no URP topics during Kafka Health Checks.
kafka_broker_health_check_urp_topics_retries: 15

kafka_broker_secrets_protection_file: "{{ ssl_file_dir_final }}/kafka-broker-security.properties"

kafka_broker_client_secrets_protection_file: "{{ ssl_file_dir_final }}/kafka-broker-client-security.properties"
Expand Down
4 changes: 2 additions & 2 deletions roles/kafka_broker/tasks/health_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
register: urp_topics
# stdout_lines will have topics with URPs and stderr has WARN and ERROR level logs
until: urp_topics.stdout_lines|length == 0 and 'ERROR' not in urp_topics.stderr
retries: 15
retries: "{{ kafka_broker_health_check_urp_topics_retries }}"
delay: 5
ignore_errors: true
changed_when: false
Expand All @@ -25,7 +25,7 @@
register: urp_topics_secrets_protection
# stdout_lines will have topics with URPs and stderr has WARN and ERROR level logs
until: urp_topics_secrets_protection.stdout_lines|length == 0 and 'ERROR' not in urp_topics_secrets_protection.stderr
retries: 15
retries: "{{ kafka_broker_health_check_urp_topics_retries }}"
delay: 5
ignore_errors: true
changed_when: false
Expand Down

0 comments on commit 275b6eb

Please sign in to comment.