Skip to content

Commit

Permalink
fix get logs
Browse files Browse the repository at this point in the history
  • Loading branch information
dciangot committed Oct 30, 2023
1 parent 0524296 commit a2eadbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/sidecars/slurm/GetLogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ func GetLogsHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(statusCode)
return
} else {
JIDs = append(JIDs, JidStruct{PodUID: "58b735d3-3973-4474-bdda-949978cd13a3", JID: "123456"})
for _, jid := range JIDs {
if jid.PodUID == req.PodUID {
cmd = OSexec.Command("cat", "slurm-"+jid.JID+".out")
}
}
cmd = OSexec.Command("cat", "slurm-"+req.PodUID+"_*")
}

output, err := cmd.CombinedOutput()
Expand Down
1 change: 1 addition & 0 deletions pkg/virtualkubelet/virtualkubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ func (p *VirtualKubeletProvider) GetLogs(ctx context.Context, namespace, podName

logsRequest := commonIL.LogStruct{
Namespace: namespace,
PodUID: string(p.pods[podName].UID),
PodName: podName,
ContainerName: containerName,
Opts: commonIL.ContainerLogOpts(opts),
Expand Down

0 comments on commit a2eadbb

Please sign in to comment.