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
Not possible to remove a shard in a multi sharded cluster in since MongoDB server version 8.
More about the problem
We have a running test cluster with two shards rs0 and rs1. When updating the cr.yaml without the rs1 configuration the following error is thrown:
2025-03-19T13:27:40.154Z ERROR Reconciler error {"controller": "psmdb-controller", "controllerGroup": "psmdb.percona.com", "controllerKind": "PerconaServerMongoDB", "PerconaServerMongoDB": {"name":"cluster-psmdb-db","namespace":"my-cluster-name"}, "namespace": "my-cluster-name", "name": "cluster-psmdb-db", "reconcileID": "863409b3-0d63-4edc-8fba-8aab8a8014f6", "error": "check remove posibility for rs rs1: failed to list databases for rs rs1: listDatabases: (Unauthorized) You are connecting to a sharded cluster improperly by connecting directly to a shard. Please connect to the cluster via a router (mongos).", "errorVerbose": "(Unauthorized) You are connecting to a sharded cluster improperly by connecting directly to a shard. Please connect to the cluster via a router (mongos).\nlistDatabases\ngithub.com/percona/percona-server-mongodb-operator/pkg/psmdb/mongo.(*mongoClient).ListDBs\n\t/go/src/github.com/percona/percona-server-mongodb-operator/pkg/psmdb/mongo/mongo.go:490\ngithub.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb. [...]
Expectation:
The shard rs1 is removed.
Steps to reproduce
Create a sharded cluster with at least two shards.
Remove one shard from the configuration.
Versions
Kubernetes: AWS EKS 1.32
Operator: 1.19.1
Database: percona-server-mongodb:8.0.4-2
Anything else?
Not possible to change system-level users to add the missing privilege directShardOperations
The text was updated successfully, but these errors were encountered:
Report
Not possible to remove a shard in a multi sharded cluster in since MongoDB server version 8.
More about the problem
We have a running test cluster with two shards rs0 and rs1. When updating the cr.yaml without the rs1 configuration the following error is thrown:
2025-03-19T13:27:40.154Z ERROR Reconciler error {"controller": "psmdb-controller", "controllerGroup": "psmdb.percona.com", "controllerKind": "PerconaServerMongoDB", "PerconaServerMongoDB": {"name":"cluster-psmdb-db","namespace":"my-cluster-name"}, "namespace": "my-cluster-name", "name": "cluster-psmdb-db", "reconcileID": "863409b3-0d63-4edc-8fba-8aab8a8014f6", "error": "check remove posibility for rs rs1: failed to list databases for rs rs1: listDatabases: (Unauthorized) You are connecting to a sharded cluster improperly by connecting directly to a shard. Please connect to the cluster via a router (mongos).", "errorVerbose": "(Unauthorized) You are connecting to a sharded cluster improperly by connecting directly to a shard. Please connect to the cluster via a router (mongos).\nlistDatabases\ngithub.com/percona/percona-server-mongodb-operator/pkg/psmdb/mongo.(*mongoClient).ListDBs\n\t/go/src/github.com/percona/percona-server-mongodb-operator/pkg/psmdb/mongo/mongo.go:490\ngithub.com/percona/percona-server-mongodb-operator/pkg/controller/perconaservermongodb. [...]
Expectation:
The shard rs1 is removed.
Steps to reproduce
Versions
Anything else?
Not possible to change system-level users to add the missing privilege directShardOperations
The text was updated successfully, but these errors were encountered: