Skip to content

Commit 2ca8b05

Browse files
committed
start fresh
1 parent 7099922 commit 2ca8b05

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/aws/ec2.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ def __kill_auxiliaries(self) -> None:
348348
if args.operation == "stop":
349349
ec2.cleanup()
350350
else:
351+
# Always cleanup before starting to ensure clean state
352+
logging.info("Cleaning up any previous enclave and auxiliary processes before starting")
353+
try:
354+
ec2.cleanup()
355+
except Exception as e:
356+
logging.warning(f"Cleanup before start encountered an error (may be expected on first boot): {e}")
351357
ec2.run_compute()
352358
except ConfidentialComputeStartupError as e:
353359
logging.error(f"Failed starting up Confidential Compute. Please checks the logs for errors and retry {e}")

0 commit comments

Comments
 (0)