Skip to content

Commit

Permalink
test(util): fix wait_until_cloud_init exit code 2 (#5058)
Browse files Browse the repository at this point in the history
Make wait_until_cloud_init aware of the new success-sh exit code 2.
  • Loading branch information
aciba90 committed Jun 5, 2024
1 parent 7e4d293 commit a061e81
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/integration_tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,8 @@ def wait_for_cloud_init(client: "IntegrationInstance", num_retries: int = 30):
for _ in range(num_retries):
try:
result = client.execute("cloud-init status")
if (
result
and result.ok
and ("running" not in result or "not started" not in result)
if result.return_code in (0, 2) and (
"running" not in result or "not started" not in result
):
return result
except Exception as e:
Expand Down

0 comments on commit a061e81

Please sign in to comment.