I was wondering why I see in logs my test server instance connecting to my production instance.
The issue is that some server components (e.g. mediascanner) also act as client.
I spun up a test server on the same machine where I have a client configured to connect to the production instance.
Hence my production server accidentally acted as a client not to itself, but to the production server.
Solution
Maybe have some sort of cluster ID which is stored in the client config file. Then when reading the client config file, assert that the server and the client cluster IDs match?
Problem
I was wondering why I see in logs my test server instance connecting to my production instance.
The issue is that some server components (e.g. mediascanner) also act as client.
I spun up a test server on the same machine where I have a client configured to connect to the production instance.
Hence my production server accidentally acted as a client not to itself, but to the production server.
Solution
Maybe have some sort of cluster ID which is stored in the client config file. Then when reading the client config file, assert that the server and the client cluster IDs match?
See also: "lineage" in Terraform: https://developer.hashicorp.com/terraform/language/state/backends#manual-state-pull-push