Skip to content

Commit

Permalink
nodes and services in maintenance can cause excessive logging
Browse files Browse the repository at this point in the history
When a cloud environment has nodes and/or services in maintenance then
fabio can generate excessive logging every time the routing table is
generated. Since these messages can be useful they remain in the code
but are being logged as DEBUG which after merging #366 is no longer
logged by default.

Fixes #367
  • Loading branch information
magiconair committed Oct 9, 2017
1 parent 77307f6 commit 7b54a12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions registry/consul/passing.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ func passingServices(checks []*api.HealthCheck, status []string) []*api.HealthCh
// node and the service are not in maintenance mode.
for _, c := range checks {
if c.CheckID == "serfHealth" && c.Node == svc.Node && c.Status == "critical" {
log.Printf("[INFO] consul: Skipping service %q since agent on node %q is down: %s", svc.ServiceID, svc.Node, c.Output)
log.Printf("[DEBUG] consul: Skipping service %q since agent on node %q is down: %s", svc.ServiceID, svc.Node, c.Output)
goto skip
}
if c.CheckID == "_node_maintenance" && c.Node == svc.Node {
log.Printf("[INFO] consul: Skipping service %q since node %q is in maintenance mode: %s", svc.ServiceID, svc.Node, c.Output)
log.Printf("[DEBUG] consul: Skipping service %q since node %q is in maintenance mode: %s", svc.ServiceID, svc.Node, c.Output)
goto skip
}
if c.CheckID == "_service_maintenance:"+svc.ServiceID && c.Status == "critical" {
log.Printf("[INFO] consul: Skipping service %q since it is in maintenance mode: %s", svc.ServiceID, c.Output)
log.Printf("[DEBUG] consul: Skipping service %q since it is in maintenance mode: %s", svc.ServiceID, c.Output)
goto skip
}
}
Expand Down

0 comments on commit 7b54a12

Please sign in to comment.