Skip to content

Commit

Permalink
VM error log file (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebattat authored Oct 28, 2024
1 parent 59b8840 commit 06ef30c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion benchmark_runner/workloads/bootstorm_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,15 @@ def _verify_single_vm(self, vm_name, retries=5, delay=10):
}

if virtctl_status != "True":
logger.info(f"All attempts failed for VM {vm_name}. Final SSH status: {self._data_dict['virtctl_status']}")
logger.info(
f"All attempts failed for VM {vm_name}. Final SSH status: {self._data_dict.get('virtctl_status', 'No status available')}")
error_log_path = f"{self._run_artifacts_path}/{vm_name}_error.log"

# Retrieve the status or use a default message
status_message = self._data_dict.get('virtctl_status') or "No status available"

with open(error_log_path, "w") as error_log_file:
error_log_file.write(str(status_message)) # Convert to string just in case

self._finalize_vm()
return virtctl_status
Expand Down

0 comments on commit 06ef30c

Please sign in to comment.