You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
147731: roachprod: fix service registration for unregistered services r=herkolategan a=DarrylWong
As of #125393, we no longer register all virtual clusters with DNS. This was an optimization made to reduce unnecessary DNS usage when there was only one tenant using the default ports. Specifically, we no longer register shared process tenants and system tenants using the default ports.
However, some of the existing logic still assumes that registration happens for all virtual clusters. For example, `clusterSynced.Stop` errors out if a shared process virtual cluster is not registered, even though this is now the expected behavior.
This change:
1. Establishes that the `system interface` is a `shared-process service` as it contains both a KV and SQL server. Previously, a system tenant could be registered as either depending on if custom ports were used or not.
2. Renames `DiscoverService` to `ServiceDescriptor` to differentiate it from `DiscoverServices`. `DiscoverService` is a convenience function for `DiscoverServices` that returns just a single service. Importantly, it also implements fall back logic to handle when a service is not found which is necessary now that we no longer register all services.
3. Renames `DiscoverServices` to `discoverServices`. Since this function does not implement fall back logic needed for correctness, it should not be used directly. All existing usage of `discoverServices` is refactored to use `ServiceDescriptor` instead.
4. Adds a unit test to ensure our new fall back logic behaves as expected.
Release note: none
Epic: none
Fixes: none
Co-authored-by: DarrylWong <[email protected]>
0 commit comments