From 30870142c2bd2861b5384e6c94e1fdf340fa705a Mon Sep 17 00:00:00 2001 From: davidrobert Date: Sun, 1 Sep 2024 10:32:11 +0300 Subject: [PATCH] merge fix --- src/node-agent/pkg/container/containerinfo.go | 9 +++++---- src/node-agent/pkg/container/manager.go | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/node-agent/pkg/container/containerinfo.go b/src/node-agent/pkg/container/containerinfo.go index 1e492da4..8d5d0e84 100644 --- a/src/node-agent/pkg/container/containerinfo.go +++ b/src/node-agent/pkg/container/containerinfo.go @@ -3,10 +3,11 @@ package container import "github.com/otterize/network-mapper/src/bintools/bininfo" type ContainerInfo struct { - Id string - Pid int `json:"pid"` - PodId string `json:"sandboxId"` - PodIP string + Id string + Pid int `json:"pid"` + PodId string `json:"sandboxId"` + PodIP string + ExecutableInfo ExecutableInfo } type ExecutableInfo struct { diff --git a/src/node-agent/pkg/container/manager.go b/src/node-agent/pkg/container/manager.go index a7d09a58..54e0b063 100644 --- a/src/node-agent/pkg/container/manager.go +++ b/src/node-agent/pkg/container/manager.go @@ -60,9 +60,9 @@ func (m *ContainerManager) GetContainerInfo(ctx context.Context, pod v1.Pod, con info.PodIP = pod.Status.PodIP // Get the executable info - execInfo, err := m.InspectContainerExec(info.GetPID()) + execInfo, err := m.InspectContainerExec(info.Pid) if err != nil { - return nil, errors.Wrap(err) + return ContainerInfo{}, errors.Wrap(err) } info.ExecutableInfo = execInfo