Skip to content

Commit

Permalink
Log restart reason if runtime reports it
Browse files Browse the repository at this point in the history
  • Loading branch information
raymyers committed Jan 24, 2025
1 parent 93753ac commit 7248a86
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openhands/runtime/impl/remote/remote_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ def _wait_until_alive_impl(self):
assert 'pod_status' in runtime_data
pod_status = runtime_data['pod_status'].lower()
self.log('debug', f'Pod status: {pod_status}')
restart_count = runtime_data.get('restart_count', 0)
if restart_count != 0:
restart_reasons = runtime_data.get('restart_reasons')
self.log(
'debug', f'Pod restarts: {restart_count}, reasons: {restart_reasons}'
)

# FIXME: We should fix it at the backend of /start endpoint, make sure
# the pod is created before returning the response.
Expand Down

0 comments on commit 7248a86

Please sign in to comment.