Skip to content

Commit

Permalink
Fix pod logs (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtomlinson committed Oct 13, 2023
1 parent c783909 commit cb209c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dask_kubernetes/operator/kubecluster/kubecluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ async def _create_cluster(self):
raise SchedulerStartupError(
"Scheduler failed to start.",
"Scheduler Pod logs:",
await scheduler_pod.logs(),
"\n".join([line async for line in scheduler_pod.logs()]),
) from e
self._log("Waiting for scheduler service")
await wait_for_service(f"{self.name}-scheduler", self.namespace)
Expand Down Expand Up @@ -579,7 +579,7 @@ async def _get_logs(self):
raise ValueError(
f"Cannot get logs for pod with status {pod.status.phase}.",
)
log = Log(await pod.logs())
log = Log("\n".join([line async for line in pod.logs()]))
except ValueError:
log = Log(f"Cannot find logs. Pod is {pod.status.phase}.")
logs[pod.name] = log
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kubernetes-asyncio>=12.0.1
kopf>=1.35.3
pykube-ng>=22.9.0
rich>=12.5.1
kr8s>=0.8.19
kr8s>=0.9.0

0 comments on commit cb209c9

Please sign in to comment.