Skip to content

fix cross-node deregistration in catalog sync for multi-cluster deployments#5139

Open
jukie wants to merge 2 commits intohashicorp:mainfrom
jukie:fix-multi-cluster-conflict
Open

fix cross-node deregistration in catalog sync for multi-cluster deployments#5139
jukie wants to merge 2 commits intohashicorp:mainfrom
jukie:fix-multi-cluster-conflict

Conversation

@jukie
Copy link
Contributor

@jukie jukie commented Feb 24, 2026

Summary

When multiple K8s clusters sync services to the same Consul datacenter, the deregistration logic in deregisterRemovedService() and scheduleReapServiceLocked() would query all service instances across all nodes via Catalog().Service(), then deregister instances it didn't recognize — including those belonging to other clusters.

This caused syncers to fight, repeatedly deregistering each other's services.

The updated logic filters deregistration candidates by ConsulNodeName so each syncer only manages services on its own node.

Changes proposed in this PR

-Fix consulNodeName filtering when reaping/deregistering services in consul

How I've tested this PR

Forked build running inside cluster

How I expect reviewers to test this PR

Checklist

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

…yments

Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>
@jukie jukie requested review from a team as code owners February 24, 2026 16:46
Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant