Skip to content

Commit

Permalink
Fix gateway services cleanup where proxy deregistration happens after…
Browse files Browse the repository at this point in the history
… service deregistration
  • Loading branch information
Andrew Stucki committed Sep 15, 2023
1 parent 1fda296 commit 855c163
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions agent/consul/state/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,12 @@ func (s *Store) deleteServiceTxn(tx WriteTxn, idx uint64, nodeName, serviceID st
if err := cleanupKindServiceName(tx, idx, sn, structs.ServiceKindConnectEnabled); err != nil {
return fmt.Errorf("failed to cleanup connect-enabled service name: %v", err)
}
// we need to do this if the proxy is deleted after the service itself
// as the guard after this might not be 1-1 between proxy and service
// names.
if err := cleanupGatewayWildcards(tx, idx, sn, false); err != nil {
return fmt.Errorf("failed to clean up gateway-service associations for %q: %v", psn.String(), err)
}
}
}

Expand Down

0 comments on commit 855c163

Please sign in to comment.