The Discovery mechanism doesn't determine the mode of all instances in a replica set when using the URI. This results in some instances being marked with an unknown state, despite the correct address for connection is known.
Example:
Start tarantool application (vshard cluster in my case).
Run the tt replicaset status command with a URI:
$ tt replicaset status tcp://client:secret@127.0.0.1:3301
The output shows an incorrect state for one of the instances:
If URI is provided in tt command, topology.InstanceUUID is the URI of the instance with the provided URI, so the check is performed only for the single instance, the rest remain in the ModeUnknown state.
I tried hardcoding a solution by passing connOpts, iterating over the instances, and collecting their modes. However, it seems that this issue requires a more thorough investigation, as the mechanism is used in multiple places.
Description
The Discovery mechanism doesn't determine the mode of all instances in a replica set when using the URI. This results in some instances being marked with an
unknown
state, despite the correct address for connection is known.Example:
Start tarantool application (vshard cluster in my case).
Run the
tt replicaset status
command with a URI:The output shows an incorrect state for one of the instances:
Run the same command using a cluster name:
The output is correct:
My attempts
For example for centralized config applications, the instance operating mode is assigned here
https://github.com/tarantool/tt/blob/1ea57bf4073a5dc1830333f5e1dc63341c028b02/cli/replicaset/cconfig.go#L266-L274
If URI is provided in tt command,
topology.InstanceUUID
is the URI of the instance with the provided URI, so the check is performed only for the single instance, the rest remain in theModeUnknown
state.I tried hardcoding a solution by passing
connOpts
, iterating over the instances, and collecting their modes. However, it seems that this issue requires a more thorough investigation, as the mechanism is used in multiple places.Patch: https://github.com/mandesero/tt/tree/mandesero/discovery-hot-fix
Discussion: https://github.com/tarantool/tt/pull/1030#issuecomment-2488762044