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) (#187)

Signed-off-by: msherif1234 <[email protected]>
(cherry picked from commit c8c9e6a)
  • Loading branch information
msherif1234 authored Sep 21, 2023
1 parent 4f4851d commit d2884db
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 d2884db

Please sign in to comment.