eth-cscs / manta

Another CLI for Alps
https://eth-cscs.github.io/manta/
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

FEAT: add capability to fetch IMS job logs #61

Open Masber opened 5 months ago

Masber commented 5 months ago

IMS jobs translates to k8s jobs. Unfortunately, kubectl -n ims describe job <ims job name> won't show the pod it relates to. There for to find our the pod related to an IMS job we need to filter pods in ims namespace by jobname label like:

$ kubectl -n ims get pods --selector=job-name=cray-ims-e8b8092a-5312-47d2-a434-8cf76e49f10e-create
NAME                                                         READY   STATUS     RESTARTS   AGE
cray-ims-e8b8092a-5312-47d2-a434-8cf76e49f10e-create-v7bjs   0/2     Init:3/4   0          85m

then fetch the logs

$ kubectl -n ims logs cray-ims-e8b8092a-5312-47d2-a434-8cf76e49f10e-create-v7bjs -c build-image

Extend the manta log <job name> functionality so it can fetch the logs from an IMS job, the command does not know if the job name belongs to CFS session or an IMS job therefore it needs to search both