Skip to content

Commit

Permalink
fix logs in interlink
Browse files Browse the repository at this point in the history
Signed-off-by: Diego Ciangottini <[email protected]>
  • Loading branch information
dciangot committed Jan 18, 2024
1 parent d44359e commit c317f2c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
7 changes: 1 addition & 6 deletions .idea/interLink.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VKTokenFile: "$HOME/interLink/token"
InterlinkURL: "http://10.25.127.213"
SidecarURL: "http://10.25.127.213"
InterlinkURL: "http://XXX.XXX.XXX.XXX"
SidecarURL: "http://XXX.XXX.XXX.XXX"
InterlinkPort: "3000"
SidecarPort: "4000"
SbatchPath: "/usr/bin/sbatch"
Expand Down
4 changes: 2 additions & 2 deletions examples/interlink-slurm/vk/InterLinkConfig.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VKTokenFile: "$HOME/interLink/token"
InterlinkURL: "http://10.25.127.213"
SidecarURL: "http://10.25.127.213"
InterlinkURL: "http://XXX.XXX.XXX.XXX"
SidecarURL: "http://XXX.XXX.XXX.XXX"
InterlinkPort: "3000"
SidecarPort: "4000"
SbatchPath: "/usr/bin/sbatch"
Expand Down
11 changes: 0 additions & 11 deletions pkg/interlink/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/containerd/containerd/log"
commonIL "github.com/intertwin-eu/interlink/pkg/common"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func GetLogsHandler(w http.ResponseWriter, r *http.Request) {
Expand All @@ -31,16 +30,6 @@ func GetLogsHandler(w http.ResponseWriter, r *http.Request) {
return
}

log.G(Ctx).Info("InterLink: get GetLogs podUID: now ", string(req2.PodUID))
pod, err := Clientset.CoreV1().Pods(req2.Namespace).Get(Ctx, req2.PodName, metav1.GetOptions{})
if err != nil {
statusCode = http.StatusInternalServerError
w.WriteHeader(statusCode)
log.G(Ctx).Error(err)
return
}
req2.PodUID = string(pod.UID)

log.G(Ctx).Info("InterLink: new GetLogs podUID: now ", string(req2.PodUID))
if (req2.Opts.Tail != 0 && req2.Opts.LimitBytes != 0) || (req2.Opts.SinceSeconds != 0 && !req2.Opts.SinceTime.IsZero()) {
statusCode = http.StatusInternalServerError
Expand Down

0 comments on commit c317f2c

Please sign in to comment.