Skip to content

Commit

Permalink
NETOBSERV-1317: change netns errors to warnings to avoid confustion (#…
Browse files Browse the repository at this point in the history
…186)

Signed-off-by: msherif1234 <[email protected]>
  • Loading branch information
msherif1234 authored Sep 20, 2023
1 parent 7db2dd4 commit c8c9e6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ifaces/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func getNetNSHandles() ([]netns.NsHandle, error) {
log := logrus.WithField("component", "ifaces.Watcher")
files, err := os.ReadDir(netnsVolume)
if err != nil {
log.WithError(err).Error("can't detect any network-namespaces")
log.Warningf("can't detect any network-namespaces err: %v [Ignore if the agent privileged flag is not set]", err)
return nil, fmt.Errorf("failed to list network-namespaces: %w", err)
}

Expand Down Expand Up @@ -188,6 +188,6 @@ func (w *Watcher) netnsNotify(ctx context.Context, out chan Event) {

err = w.netnsWatcher.Add(netnsVolume)
if err != nil {
log.WithError(err).Error("failed to add watcher to netns directory")
log.Warningf("failed to add watcher to netns directory err: %v [Ignore if the agent privileged flag is not set]", err)
}
}

0 comments on commit c8c9e6a

Please sign in to comment.