Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions enterprise_gateway/services/processproxies/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,15 @@ async def confirm_remote_startup(self) -> None:
"""Confirms the container has started and returned necessary connection information."""
self.log.debug("Trying to confirm kernel container startup status")
self.start_time = RemoteProcessProxy.get_current_time()
i = 0
i = 1
container_status = self.get_container_status(i)
while not container_status:
i += 1
self.detect_launch_failure()
await self.handle_timeout()

container_status = self.get_container_status(i)

ready_to_connect = False # we're ready to connect when we have a connection file to use
while not ready_to_connect:
i += 1
Expand All @@ -211,7 +219,11 @@ async def confirm_remote_startup(self) -> None:
)
self.pgid = 0
else:
self.detect_launch_failure()
self.log_and_raise(
http_status_code=500,
reason="Error starting kernel container; status was not available. "
"Perhaps the kernel pod died unexpectedly",
)

def get_process_info(self) -> dict[str, Any]:
"""Captures the base information necessary for kernel persistence relative to containers."""
Expand Down