Skip to content

Commit

Permalink
wait a bit after controller has stopped
Browse files Browse the repository at this point in the history
Relates to: #668

By waiting a bit, e.g. 1s, after the controller has stopped
the agent will fail to reconnect at least one time - testing
the perpetual retry to connect to the controller again.

Signed-off-by: Michael Engel <[email protected]>
  • Loading branch information
engelmi committed Dec 15, 2023
1 parent 49e3edb commit f7b2272
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def exec(ctrl: BluechiControllerContainer, nodes: Dict[str, BluechiNodeContainer
ctrl.exec_run("systemctl stop bluechi-controller")
ctrl.wait_for_unit_state_to_be('bluechi-controller', 'inactive')

# lets wait a bit so the agent has at least one failing reconnect attempt
time.sleep(1)

ctrl.exec_run("systemctl start bluechi-controller")
ctrl.wait_for_bluechi()
# since the heartbeat (incl. a try to reconnect) is going to happen
Expand Down

0 comments on commit f7b2272

Please sign in to comment.