From eb462bae08c8ac4843d254cd2edf98b3ba796ebd Mon Sep 17 00:00:00 2001 From: Aaron U'Ren Date: Fri, 8 Dec 2023 16:44:02 -0600 Subject: [PATCH] feat(linux_networking.go): add more error info Direct people to a potentially missing hostPID attribute in their kube-router deployment if they are getting a no such file or directory message. --- pkg/controllers/proxy/linux_networking.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/controllers/proxy/linux_networking.go b/pkg/controllers/proxy/linux_networking.go index 28b1189371..b79ab81ad6 100644 --- a/pkg/controllers/proxy/linux_networking.go +++ b/pkg/controllers/proxy/linux_networking.go @@ -625,7 +625,9 @@ func (ln *linuxNetworking) findIfaceLinkForPid(pid int) (int, error) { sysFSNetClassRelPath) entries, err := os.ReadDir(ifacesPath) if err != nil { - klog.Warningf("could not list: %s due to: %v", ifacesPath, entries) + klog.Warningf("Could not list: %s due to: %v", ifacesPath, err) + klog.Warning("If above error was 'no such file or directory' it may be that you haven't enabled " + + "'hostPID=true' in your kube-router deployment") return } var sb strings.Builder