mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-09-14 08:03:19 +02:00
fix(verify): retry the nginx VIP assert on transient ARP miss
- convert the verify_from_outside URI assert to register/until/retries/delay - retry until the MetalLB VIP returns HTTP 200 with the welcome page - cover the host-only L2 announcement race that failed CI on the shared runner - add a regression test asserting the retry wiring and hook it into pre-commit
This commit is contained in:
committed by
Techno Tim
parent
ac77e33be0
commit
c8c3609fde
@@ -69,7 +69,16 @@
|
||||
url: http://{{ nginx_lb_ip | ansible.utils.ipwrap }}:{{ port_ }}/
|
||||
return_content: true
|
||||
register: result
|
||||
failed_when: "'Welcome to nginx!' not in result.content"
|
||||
# The MetalLB speaker announces the VIP on the host-only network, and the
|
||||
# runner may briefly not see it in its ARP table yet. Retry so a transient
|
||||
# announcement miss does not fail an otherwise healthy cluster, matching
|
||||
# the load-balancer address wait above and the k3s_server_post metallb waits.
|
||||
until:
|
||||
- result.status is defined
|
||||
- result.status == 200
|
||||
- "'Welcome to nginx!' in result.content"
|
||||
retries: 30
|
||||
delay: 5
|
||||
vars:
|
||||
port_: >-
|
||||
{{ nginx_services.resources[0].spec.ports[0].port }}
|
||||
|
||||
Reference in New Issue
Block a user