Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cluster name to aggregated SI status on local SI creation
...instead of when local EPS is synced to the broker. This can cause inconsistency if another service instance is unexported on another cluster simultaneously. The scenario is: - a service is exported on C2 - the service is then exported on C1. The local SI is created and it's observed that the aggregated SI on the broker already exists. - the service on C2 is unexported and the aggregated SI is deleted b/c its cluster status is now empty. - the local EPS on C1 is synced to the broker. At this point, it tries to update the aggregated SI with the cluster info but it no longer exists. There’s a couple ways to address it. 1) Do create-or-update when merging the local cluster info on EPS creation. The downside is that this wouldn’t do the service type conflict checking although the possibility that the SI was re-created by another cluster with a different service type in that window would be remote. 2) Add the cluster name to the aggregated SI cluster status when created on local SI creation. This would’ve prevented C1 from deleting the aggregated SI b/c C2's name would’ve been present in the cluster status. I didn’t do it this way for consistency so the cluster name and port info are added atomically and after the EPS has been successfully exported to ensure it’s ready for use if a consumer observes the cluster info present. But this isn’t a requirement. The consensus is #2. Signed-off-by: Tom Pantelis <[email protected]>
- Loading branch information