We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
http: Server closed
Describe the bug Trident logs http: Server closed as a fatal error when it shutdowns.
time="2021-07-01T01:47:30Z" level=fatal msg="http: Server closed"
Tident components call func (*Server) Shutdown, so ErrServerClosed(http: Server closed) is returned in normal cases.
Environment
silenceAutosupport: true
To Reproduce
kubectl logs -n trident --since 10s -f trident-csi-xxxx
kubectl delete pod -n trident trident-csi-xxxx
Expected behavior ErrServerClosed(http: Server closed) should be ignored like below. (ListenAndServe always returns a non-nil error.)
ErrServerClosed
diff --git a/frontend/metrics/plugin.go b/frontend/metrics/plugin.go index fd1562f..0c2a109 100644 --- a/frontend/metrics/plugin.go +++ b/frontend/metrics/plugin.go @@ -38,7 +38,7 @@ func (s *Server) Activate() error { go func() { log.WithField("address", s.server.Addr).Info("Activating metrics frontend.") http.Handle("/metrics", s.server.Handler) - if err := s.server.ListenAndServe(); err != nil { + if err := s.server.ListenAndServe(); err != http.ErrServerClosed { log.Fatal(err) } }()
The text was updated successfully, but these errors were encountered:
This is fixed with commit ddddc0b and will be included in the Trident v21.10 release.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Trident logs
http: Server closed
as a fatal error when it shutdowns.Tident components call func (*Server) Shutdown, so ErrServerClosed(
http: Server closed
) is returned in normal cases.Environment
silenceAutosupport: true
(Trident Operator)To Reproduce
kubectl logs -n trident --since 10s -f trident-csi-xxxx
kubectl delete pod -n trident trident-csi-xxxx
Expected behavior
ErrServerClosed
(http: Server closed
) should be ignored like below. (ListenAndServe always returns a non-nil error.)The text was updated successfully, but these errors were encountered: