From c317f2ce8f60eb121b6b6515eeec9e7f66b904a3 Mon Sep 17 00:00:00 2001 From: Diego Ciangottini Date: Thu, 18 Jan 2024 10:06:15 +0100 Subject: [PATCH] fix logs in interlink Signed-off-by: Diego Ciangottini --- .idea/interLink.iml | 7 +------ .../interlink/config/InterLinkConfig.yaml | 4 ++-- examples/interlink-slurm/vk/InterLinkConfig.yaml | 4 ++-- pkg/interlink/logs.go | 11 ----------- 4 files changed, 5 insertions(+), 21 deletions(-) diff --git a/.idea/interLink.iml b/.idea/interLink.iml index 5e764c4f..7ee078df 100644 --- a/.idea/interLink.iml +++ b/.idea/interLink.iml @@ -1,9 +1,4 @@ - + - - - - - \ No newline at end of file diff --git a/examples/interlink-slurm/interlink/config/InterLinkConfig.yaml b/examples/interlink-slurm/interlink/config/InterLinkConfig.yaml index 1f0c66b3..bf793e90 100644 --- a/examples/interlink-slurm/interlink/config/InterLinkConfig.yaml +++ b/examples/interlink-slurm/interlink/config/InterLinkConfig.yaml @@ -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" diff --git a/examples/interlink-slurm/vk/InterLinkConfig.yaml b/examples/interlink-slurm/vk/InterLinkConfig.yaml index 1f0c66b3..bf793e90 100644 --- a/examples/interlink-slurm/vk/InterLinkConfig.yaml +++ b/examples/interlink-slurm/vk/InterLinkConfig.yaml @@ -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" diff --git a/pkg/interlink/logs.go b/pkg/interlink/logs.go index efe09ff9..7fdcb365 100644 --- a/pkg/interlink/logs.go +++ b/pkg/interlink/logs.go @@ -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) { @@ -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