Skip to content

Commit

Permalink
Suppress and log in case of downloading cluster files fails (openshif…
Browse files Browse the repository at this point in the history
  • Loading branch information
YuviGold committed Mar 16, 2021
1 parent f21fa65 commit 323c581
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions discovery-infra/download_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ def download_logs(client: InventoryClient, cluster: dict, dest: str, must_gather
with suppressAndLog(AssertionError, ConnectionError, requests.exceptions.ConnectionError):
client.download_metrics(os.path.join(output_folder, "metrics.txt"))

for ignition_file in ("bootstrap.ign", "master.ign", "worker.ign", "install-config.yaml"):
with suppress(assisted_service_client.rest.ApiException):
client.download_and_save_file(cluster['id'], ignition_file,
os.path.join(output_folder, "cluster_files", ignition_file))
for cluster_file in ("bootstrap.ign", "master.ign", "worker.ign", "install-config.yaml"):
with suppressAndLog(assisted_service_client.rest.ApiException):
client.download_and_save_file(cluster['id'], cluster_file,
os.path.join(output_folder, "cluster_files", cluster_file))

for host_id in map(lambda host: host['id'], cluster['hosts']):
with suppressAndLog(assisted_service_client.rest.ApiException):
Expand Down

0 comments on commit 323c581

Please sign in to comment.