Skip to content

Atlas Sharded Cluster Compatibility #159

Description

@zhangyaoxing

When running against Atlas sharded clusters, the permission doesn't allow us to directly connect to the shard nodes. Which leads to the following error

Failed to get execution result from atlas-vnfeuv-shard-0, member atlas-vnfeuv-shard-00-00.wy1z6.mongodb.net:27017: OperationFailure You are connecting to a sharded cluster improperly by connecting directly to a shard. Please connect to the cluster via a router (mongos). Command: listDatabases, Namespace: Foo, full error: {'ok': 0.0, 'errmsg': 'You are connecting to a sharded cluster improperly by connecting directly to a shard. Please connect to the cluster via a router (mongos). Command: listDatabases, Namespace: Foo', 'code': 13, 'codeName': 'Unauthorized', '$clusterTime': {'clusterTime': Timestamp(1773141907, 2), 'signature': {'hash': b'8\xcf\xb2\x8dn\xf7\\\xc7\xdfW\xaa<\x8f\x8bQ$\x1ao\x0c\xe3', 'keyId': 7615245592997920791}}, 'operationTime': Timestamp(1773141904, 1)}

This happens to CollInfoItem and IndexInfoItem.
Find a workaround to fix the problem.

Metadata

Metadata

Assignees

Labels

hcHealth check related issues.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions