Skip to content

Commit

Permalink
introduce variable hosts_discovery_minutes in order to make host disc…
Browse files Browse the repository at this point in the history
…overy timeout configurable
  • Loading branch information
Nils Koenig authored and nocturnalastro committed Nov 28, 2023
1 parent fa2663a commit ce6a499
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions roles/install_cluster/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ host_discovery_states:
cluster_installation_states:
- installing
- installing-pending-user-action

# Time to be waited for all hosts to be discovered
hosts_discovery_minutes: 20
6 changes: 3 additions & 3 deletions roles/install_cluster/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
inventory_nodes: "{{ groups['masters'] + groups['workers'] | default([]) }}"

# Monitor hosts discovery
- name: Allow up to 20 minutes for all hosts to be discovered
- name: "Allow up to {{ hosts_discovery_minutes }} minutes for all hosts to be discovered"
uri:
url: "{{ URL_ASSISTED_INSTALLER_CLUSTER }}"
method: GET
Expand All @@ -17,7 +17,7 @@
until:
- (cluster.json.hosts | length) == (inventory_nodes | length)
- cluster.json.status in host_discovery_states
retries: 20
retries: "{{ hosts_discovery_minutes }}"
delay: 60
when: install | bool == True

Expand Down Expand Up @@ -210,4 +210,4 @@
until: cluster.json.status in cluster_installation_states
retries: 5
delay: 60


0 comments on commit ce6a499

Please sign in to comment.