Skip to content

Commit f9b941c

Browse files
author
Sergey Mezentsev
committed
[runpod] Fix RunContainerError condition
1 parent 258e02e commit f9b941c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/dstack/_internal/server/background/tasks/process_submitted_jobs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,10 @@ async def _process_submitted_job(session: AsyncSession, job_model: JobModel):
163163
if isinstance(e, ContainerTimeoutError)
164164
else JobTerminationReason.CONTAINER_EXITED_WITH_ERROR
165165
)
166-
logger.debug("%s: provisioning failed, error: %s", fmt(job_model), e)
166+
logger.debug("%s: provisioning failed: %s", fmt(job_model), e)
167167
job_model.status = JobStatus.TERMINATING
168168
job_model.termination_reason = reason
169+
job_model.termination_reason_message = str(e)
169170
job_model.last_processed_at = common_utils.get_current_datetime()
170171
await session.commit()
171172
return
@@ -290,7 +291,7 @@ async def _run_job_on_new_instance(
290291
project_ssh_public_key,
291292
project_ssh_private_key,
292293
)
293-
except (ContainerTimeoutError, ContainerTimeoutError):
294+
except (ContainerTimeoutError, RunContainerError):
294295
raise
295296
except BackendError as e:
296297
logger.warning(

0 commit comments

Comments
 (0)