Fix replset and sharding integration tests #579
Annotations
5 errors
Run tests:
spec/acceptance/replset_spec.rb#L211
mongodb_replset resource with auth => true sets up the replset with puppet
Failure/Error: apply_manifest_on(hosts_as('master'), pp, catch_failures: true)
Beaker::Host::CommandFailure:
Host 'ubuntu2004-64-1-puppet8.example.com' exited with 6 running:
puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_091938603.pp.bZg7gl
Last 10 lines of output were:
�[mNotice: Compiled catalog for ubuntu2004-64-1-puppet8.example.com in environment production in 0.03 seconds
Info: Using environment 'production'
Info: Applying configuration version '1713345583'
�[mNotice: /Stage[main]/Main/Mongodb_replset[test]/ensure: created
Warning: Host ubuntu2004-64-2-puppet8.example.com:27017 is available, but you are unauthorized because of authentication is enabled: true
Error: /Stage[main]/Main/Mongodb_replset[test]: Could not evaluate: rs.initiate() failed for replicaset test
Warning: User info is available only from master host
�[mNotice: /Stage[main]/Main/Mongodb_user[User admin on db admin]: Dependency Mongodb_replset[test] has failures: true
Warning: /Stage[main]/Main/Mongodb_user[User admin on db admin]: Skipping because of failed dependencies
�[mNotice: Applied catalog in 36.97 seconds
|
Run tests:
spec/acceptance/replset_spec.rb#L239
mongodb_replset resource with auth => true inserts data on the master
Failure/Error: on hosts_as('master'), %{mongosh test --verbose --eval 'load("/root/.mongoshrc.js");db.dummyData.insertOne({"created_by_puppet": 1})'}
Beaker::Host::CommandFailure:
Host 'ubuntu2004-64-1-puppet8.example.com' exited with 1 running:
mongosh test --verbose --eval 'load("/root/.mongoshrc.js");db.dummyData.insertOne({"created_by_puppet": 1})'
Last 10 lines of output were:
Current Mongosh Log ID: 661f9455c4479ee5eac934dc
Connecting to: mongodb://127.0.0.1:27017/test?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.4
Using MongoDB: 7.0.8
Using Mongosh: 2.2.4
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
MongoServerError: not authorized on test to execute command { insert: "dummyData", documents: [ { created_by_puppet: 1, _id: ObjectId('661f9455c4479ee5eac934dd') } ], ordered: true, lsid: { id: UUID("e9f84b0a-ca40-4b82-a66a-aae5228c03d3") }, txnNumber: 1, $clusterTime: { clusterTime: Timestamp(1713345616, 1), signature: { hash: BinData(0, CDC183789316643BD0AA7423776B1980C9F29BC8), keyId: 7358763301565628421 } }, $readPreference: { mode: "primaryPreferred" }, $db: "test" }
|
Run tests:
spec/acceptance/replset_spec.rb#L243
mongodb_replset resource with auth => true checks the data on the master
Failure/Error:
on hosts_as('master'), %{mongosh test --verbose --eval 'load("/root/.mongoshrc.js");EJSON.stringify(db.dummyData.findOne())'} do |r|
expect(r.stdout).to match %r{created_by_puppet}
end
Beaker::Host::CommandFailure:
Host 'ubuntu2004-64-1-puppet8.example.com' exited with 1 running:
mongosh test --verbose --eval 'load("/root/.mongoshrc.js");EJSON.stringify(db.dummyData.findOne())'
Last 10 lines of output were:
Current Mongosh Log ID: 661f94557552e0e44fc934dc
Connecting to: mongodb://127.0.0.1:27017/test?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.4
Using MongoDB: 7.0.8
Using Mongosh: 2.2.4
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
MongoServerError: not authorized on test to execute command { find: "dummyData", filter: {}, limit: 1, lsid: { id: UUID("b84f2e27-c35b-4d8e-a1bf-d75b12f733d8") }, $clusterTime: { clusterTime: Timestamp(1713345616, 1), signature: { hash: BinData(0, CDC183789316643BD0AA7423776B1980C9F29BC8), keyId: 7358763301565628421 } }, $readPreference: { mode: "primaryPreferred" }, $db: "test" }
|
Run tests:
spec/acceptance/replset_spec.rb#L249
mongodb_replset resource with auth => true checks the data on the slave
Failure/Error:
on hosts_as('slave'), %{mongosh test --verbose --eval 'load("/root/.mongoshrc.js");db.getMongo().setReadPref("primaryPreferred");EJSON.stringify(db.dummyData.findOne())'} do |r|
expect(r.stdout).to match %r{created_by_puppet}
end
Beaker::Host::CommandFailure:
Host 'ubuntu2004-64-2-puppet8.example.com' exited with 1 running:
mongosh test --verbose --eval 'load("/root/.mongoshrc.js");db.getMongo().setReadPref("primaryPreferred");EJSON.stringify(db.dummyData.findOne())'
Last 10 lines of output were:
Current Mongosh Log ID: 661f945f8d8e3bf605c934dc
Connecting to: mongodb://127.0.0.1:27017/test?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.4
Using MongoDB: 7.0.8
Using Mongosh: 2.2.4
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
MongoServerError: not authorized on test to execute command { find: "dummyData", filter: {}, limit: 1, lsid: { id: UUID("aa9e9b30-776f-45fa-8e24-06ccd6298fee") }, $clusterTime: { clusterTime: Timestamp(1713345626, 1), signature: { hash: BinData(0, 448E4A7D9FF43429526EC1992B40C61E09C7829D), keyId: 7358763301565628421 } }, $readPreference: { mode: "primaryPreferred" }, $db: "test" }
|
Run tests
Process completed with exit code 1.
|
Loading