Browse Source

daemon: log errors from stats calls

I encountered silent errors ignoring when runc failed to parse pids.max

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Alexander Morozov 9 years ago
parent
commit
14e1325656
1 changed files with 1 additions and 1 deletions
  1. 1 1
      daemon/stats_collector_unix.go

+ 1 - 1
daemon/stats_collector_unix.go

@@ -120,7 +120,7 @@ func (s *statsCollector) run() {
 		for _, pair := range pairs {
 			stats, err := s.supervisor.GetContainerStats(pair.container)
 			if err != nil {
-				if err, ok := err.(errNotRunning); ok {
+				if _, ok := err.(errNotRunning); !ok {
 					logrus.Errorf("collecting stats for %s: %v", pair.container.ID, err)
 				}
 				continue