Fix check deletion in anti-entropy sync (#7690)

* Incorporate entMeta into service equality check
pull/7694/head
Freddy 5 years ago committed by GitHub
parent 59a606e938
commit 3956cff60f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1098,10 +1098,13 @@ func (l *State) deleteService(key structs.ServiceID) error {
delete(l.services, key)
// service deregister also deletes associated checks
for _, c := range l.checks {
if c.Deleted && c.Check != nil && c.Check.ServiceID == key.ID {
if c.Deleted && c.Check != nil {
sid := c.Check.CompoundServiceID()
if sid.Matches(&key) {
l.pruneCheck(c.Check.CompoundCheckID())
}
}
}
l.logger.Info("Deregistered service", "service", key.ID)
return nil

Loading…
Cancel
Save