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
When running the sc-mongodb::replicaset recipe on the last member of the replica set, the connection test fails before the recipe can even initialize the replica set. I need to manually go to the server and run rs.initiate() in the mongo shell in order for the connection test to succeed on subsequent chef runs. Before I run rs.initiate(), when trying to run the command db.adminCommand( { listDatabases: 1 } ) (which is what configure_replicaset does before initializing the replica set), I get a NotMasterOrSecondary error since the replica set has not been initialized.
It seems like the connection test before initializing the replica set should not be making a command that itself requires the replica set to already be initialized.
🥞 Cookbook version
3.0.0
👩🍳 Chef-Infra Version
14.15.6
🎩 Platform details
Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-1038-aws x86_64) running on AWS EC2
Steps To Reproduce
Steps to reproduce the behavior:
Configure 3 servers, run the sc-mongodb::replicaset recipe on 2 of them with auto_configure set to false. Then run sc-mongondb::replicaset on the last one.
🚓 Expected behavior
The recipe automatically configures the replica set without any needed intervention.
The text was updated successfully, but these errors were encountered:
👻 Brief Description
When running the
sc-mongodb::replicaset
recipe on the last member of the replica set, the connection test fails before the recipe can even initialize the replica set. I need to manually go to the server and runrs.initiate()
in the mongo shell in order for the connection test to succeed on subsequent chef runs. Before I runrs.initiate()
, when trying to run the commanddb.adminCommand( { listDatabases: 1 } )
(which is whatconfigure_replicaset
does before initializing the replica set), I get aNotMasterOrSecondary
error since the replica set has not been initialized.It seems like the connection test before initializing the replica set should not be making a command that itself requires the replica set to already be initialized.
🥞 Cookbook version
3.0.0
👩🍳 Chef-Infra Version
14.15.6
🎩 Platform details
Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-1038-aws x86_64) running on AWS EC2
Steps To Reproduce
Steps to reproduce the behavior:
sc-mongodb::replicaset
recipe on 2 of them withauto_configure
set to false. Then runsc-mongondb::replicaset
on the last one.🚓 Expected behavior
The recipe automatically configures the replica set without any needed intervention.
The text was updated successfully, but these errors were encountered: