mirror of https://github.com/status-im/consul.git
continue anti-entropy sync when failures exist (#17560)
This commit is contained in:
parent
4ddb88ec7e
commit
8617f8af16
|
@ -13,20 +13,20 @@ import (
|
|||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/consul/acl/resolver"
|
||||
"github.com/hashicorp/consul/lib/stringslice"
|
||||
|
||||
"github.com/armon/go-metrics"
|
||||
"github.com/armon/go-metrics/prometheus"
|
||||
"github.com/hashicorp/go-hclog"
|
||||
"github.com/mitchellh/copystructure"
|
||||
|
||||
"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"
|
||||
)
|
||||
|
||||
var StateCounters = []prometheus.CounterDefinition{
|
||||
|
@ -1252,6 +1252,7 @@ func (l *State) SyncChanges() error {
|
|||
}
|
||||
}
|
||||
|
||||
var errs error
|
||||
// Sync the services
|
||||
// (logging happens in the helper methods)
|
||||
for id, s := range l.services {
|
||||
|
@ -1265,7 +1266,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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1286,10 +1287,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
|
||||
|
|
Loading…
Reference in New Issue