Skip to content

Commit

Permalink
[Integ-Test] Fix test_dcv intermittent failure by filter running inst…
Browse files Browse the repository at this point in the history
…ance (#6547)

* Ensure the instance is in 'running' state before try to ssh it.
  • Loading branch information
hehe7318 authored Nov 12, 2024
1 parent 955b244 commit 82653c2
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ def _add_compute_instance(self, instance):

def _add_login_instance(self, instance):
"""Update the cluster's log state by adding a login node."""
# Ensure the instance is in 'running' state
if instance.get("State", {}).get("Name") != "running":
return
login_hostname = self._run_command_on_head_node(
"ssh -o StrictHostKeyChecking=no -q {} hostname -f".format(instance.get("PrivateDnsName"))
)
Expand Down

0 comments on commit 82653c2

Please sign in to comment.