Skip to content

Commit

Permalink
feat(linux_networking.go): add more error info
Browse files Browse the repository at this point in the history
Direct people to a potentially missing hostPID attribute in their
kube-router deployment if they are getting a no such file or directory
message.
  • Loading branch information
aauren committed Dec 8, 2023
1 parent eb26288 commit eb462ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controllers/proxy/linux_networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eb462ba

Please sign in to comment.