Skip to content

Commit

Permalink
backport of commit fc71ecc (#17571)
Browse files Browse the repository at this point in the history
Co-authored-by: Maliz <[email protected]>
  • Loading branch information
hc-github-team-consul-core and Maliz authored Jun 5, 2023
1 parent 5b961fd commit 17ef0ef
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions agent/local/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import (
"sync/atomic"
"time"

"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/acl/resolver"
"github.com/hashicorp/consul/agent/structs"
"github.com/hashicorp/consul/agent/token"
"github.com/hashicorp/consul/api"
"github.com/hashicorp/consul/lib"
"github.com/hashicorp/consul/lib/stringslice"
"github.com/hashicorp/consul/types"

"github.com/armon/go-metrics"
"github.com/armon/go-metrics/prometheus"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-multierror"
"github.com/mitchellh/copystructure"

"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/agent/structs"
"github.com/hashicorp/consul/agent/token"
"github.com/hashicorp/consul/api"
"github.com/hashicorp/consul/lib"
"github.com/hashicorp/consul/types"
)

var StateCounters = []prometheus.CounterDefinition{
Expand Down Expand Up @@ -1224,6 +1224,7 @@ func (l *State) SyncChanges() error {
}
}

var errs error
// Sync the services
// (logging happens in the helper methods)
for id, s := range l.services {
Expand All @@ -1237,7 +1238,7 @@ func (l *State) SyncChanges() error {
l.logger.Debug("Service in sync", "service", id.String())
}
if err != nil {
return err
errs = multierror.Append(errs, err)
}
}

Expand All @@ -1258,10 +1259,10 @@ func (l *State) SyncChanges() error {
l.logger.Debug("Check in sync", "check", id.String())
}
if err != nil {
return err
errs = multierror.Append(errs, err)
}
}
return nil
return errs
}

// deleteService is used to delete a service from the server
Expand Down

0 comments on commit 17ef0ef

Please sign in to comment.