Skip to content

Commit

Permalink
Merge pull request kubernetes-csi#280 from verult/http-flag
Browse files Browse the repository at this point in the history
Add server listening log; fix wrong address logged in listening error
  • Loading branch information
k8s-ci-robot authored Dec 4, 2020
2 parents 681d7a4 + 28930c0 commit e544749
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/csi-attacher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@ func main() {
metricsManager.RegisterToServer(mux, *metricsPath)
metricsManager.SetDriverName(csiAttacher)
go func() {
klog.Infof("ServeMux listening at %q", addr)
err := http.ListenAndServe(addr, mux)
if err != nil {
klog.Fatalf("Failed to start Prometheus metrics endpoint on specified address (%q) and path (%q): %s", *metricsAddress, *metricsPath, err)
klog.Fatalf("Failed to start HTTP server at specified address (%q) and metrics path (%q): %s", addr, *metricsPath, err)
}
}()
}
Expand Down

0 comments on commit e544749

Please sign in to comment.