diff --git a/tests/integration-tests/tests/cloudwatch_logging/test_cloudwatch_logging.py b/tests/integration-tests/tests/cloudwatch_logging/test_cloudwatch_logging.py index 262f2dcb73..85297783be 100644 --- a/tests/integration-tests/tests/cloudwatch_logging/test_cloudwatch_logging.py +++ b/tests/integration-tests/tests/cloudwatch_logging/test_cloudwatch_logging.py @@ -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")) )