Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temper severity of extraneous errors #44416

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Temper severity of extraneous errors
When the CNI initially runs on a node that is
clean of the ztunnel chains errors and warnings
are logged that are extraneous. This change reduces
the severity and adds comments in the code.
  • Loading branch information
john-a-joyce committed Apr 17, 2023
commit f2028c2fb0eaef48e4add07af30b145c04c96dab
7 changes: 6 additions & 1 deletion cni/pkg/ambient/iptables.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ func (s *Server) initializeLists() error {
}

// Flush the chains and lists for ztunnel
// This method will log warnings if node already clean because chains
// are not created yet.
func (s *Server) flushLists() {
var err error

Expand Down Expand Up @@ -159,6 +161,9 @@ func (s *Server) flushLists() {
}
}

// Clean the chains and lists for ztunnel
// This method will log warnings if node already clean because chains
// are not created yet.
func (s *Server) cleanRules() {
var err error

Expand Down Expand Up @@ -275,7 +280,7 @@ func (s *Server) cleanRules() {
for _, l := range list {
err = execute(l.Cmd, l.Args...)
if err != nil {
log.Errorf("Error running command %v: %v", l.Cmd, err)
log.Warnf("Error running command %v: %v", l.Cmd, err)
}
}
}
Expand Down