artis3n/ansible-role-tailscale

[BUG] If tailscale_up_timeout is bigger than 60s, then the installation might fail with an empty/lost response

McSim85 opened this issue · 0 comments

Describe the bug
If tailscale_up_timeout is bigger than async: 60 * poll: 5, then the installation might fail with an empty response.
This happens if Tailscale infrastructure experiences some degradation and registration takes too long.

TASK [ansible_role_tailscale : Install | Bring Tailscale Up] ***************************************
fatal: [host]: FAILED! => changed=true
  censored: 'the output has been hidden due to the fact that ''no_log: true'' was specified for this result'
...ignoring

TASK [ansible_role_tailscale : Install | Clear State Upon Error] ***********************************
changed: [host]

TASK [ansible_role_tailscale : Install | Report redacted failure from "tailscale up"] **************
fatal: [host]: FAILED! => changed=false
  msg:
  - ''

To Reproduce
Steps to reproduce the behavior:

  1. set tailscale_up_timeoutto something bigger than the default async: 60. (e.g 120s)
  2. run the role, if the tailscale up takes longer than 60s, then the role fails, and tailscale response is lost/empty

Expected behavior
Ideally, async timeout should be equal to tailscale_up_timeout plus ~10 sec to cover final polls.

Additional context
PR is coming :)