Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-7731

Need to cancel threads when agent-tui timeout is stopped

XMLWordPrintable

    • No
    • Agent Sprint 232
    • 1
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      We need to cancel the thread that is timing out the agent-tui if one of the checks fail.
      
      The main issue is here: 
      https://github.com/openshift/agent-installer-utils/blob/44690e9106c13421dcf88681931cee4913dac60e/tools/agent_tui/ui/timeout_modal.go#L64-L67, since there''s no cancellation code for the thread

      Version-Release number of selected component (if applicable):

      4.13.0

      How reproducible:

       

      Steps to Reproduce:

      1. Start with a green scenario (all checks are ok). Timeout dialog is shown to the user. This means that in background the timer thread gets triggered and start ticking down to 0.
      2. Before it reaches 0, make a check fail. The timeout dialog disappears - in background, the timer thread is still ticking, it's just its side effects are not visible.
      3. Fix the check. The timeout dialog wil re-appear again, launching another thread. This means that there could be 2 threads running, both trying to update the timeout value with different strings
      

      Actual results:

       

      Expected results:

       

      Additional info:

       

            afasano@redhat.com Andrea Fasano
            bfournie@redhat.com Robert Fournier
            zhenying niu zhenying niu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: