@ -11,7 +11,7 @@ import (
"sync/atomic"
"time"
"github.com/hashicorp/go-uuid "
"github.com/armon/go-metrics "
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/agent/structs"
@ -19,6 +19,7 @@ import (
"github.com/hashicorp/consul/api"
"github.com/hashicorp/consul/lib"
"github.com/hashicorp/consul/types"
"github.com/hashicorp/go-uuid"
)
// Config is the configuration for the State.
@ -1087,6 +1088,7 @@ func (l *State) deleteService(id string) error {
// todo(fs): some backoff strategy might be a better solution
l . services [ id ] . InSync = true
l . logger . Printf ( "[WARN] agent: Service %q deregistration blocked by ACLs" , id )
metrics . IncrCounter ( [ ] string { "acl" , "blocked" , "service" , "deregistration" } , 1 )
return nil
default :
@ -1124,6 +1126,7 @@ func (l *State) deleteCheck(id types.CheckID) error {
// todo(fs): some backoff strategy might be a better solution
l . checks [ id ] . InSync = true
l . logger . Printf ( "[WARN] agent: Check %q deregistration blocked by ACLs" , id )
metrics . IncrCounter ( [ ] string { "acl" , "blocked" , "check" , "deregistration" } , 1 )
return nil
default :
@ -1194,6 +1197,7 @@ func (l *State) syncService(id string) error {
l . checks [ check . CheckID ] . InSync = true
}
l . logger . Printf ( "[WARN] agent: Service %q registration blocked by ACLs" , id )
metrics . IncrCounter ( [ ] string { "acl" , "blocked" , "service" , "registration" } , 1 )
return nil
default :
@ -1239,6 +1243,7 @@ func (l *State) syncCheck(id types.CheckID) error {
// todo(fs): some backoff strategy might be a better solution
l . checks [ id ] . InSync = true
l . logger . Printf ( "[WARN] agent: Check %q registration blocked by ACLs" , id )
metrics . IncrCounter ( [ ] string { "acl" , "blocked" , "check" , "registration" } , 1 )
return nil
default :
@ -1270,6 +1275,7 @@ func (l *State) syncNodeInfo() error {
// todo(fs): some backoff strategy might be a better solution
l . nodeInfoInSync = true
l . logger . Printf ( "[WARN] agent: Node info update blocked by ACLs" )
metrics . IncrCounter ( [ ] string { "acl" , "blocked" , "node" , "registration" } , 1 )
return nil
default :