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 'ubuntu2204-64-1-puppet7.example.com' exited with 6 running:
puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_091736983.pp.qef894
Last 10 lines of output were:
�[mNotice: Compiled catalog for ubuntu2204-64-1-puppet7.example.com in environment production in 0.03 seconds
Info: Using environment 'production'
Info: Applying configuration version '1713345461'
�[mNotice: /Stage[main]/Main/Mongodb_replset[test]/ensure: created
Warning: Host ubuntu2204-64-2-puppet7.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.92 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 'ubuntu2204-64-1-puppet7.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: 661f93dac5bd3dfbd3c934dc
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('661f93dbc5bd3dfbd3c934dd') } ], ordered: true, lsid: { id: UUID("91098570-122f-4a8b-91ff-ede38324458d") }, txnNumber: 1, $clusterTime: { clusterTime: Timestamp(1713345495, 1), signature: { hash: BinData(0, 0366300688BA3AC78F5C49F7DCD1B6668F02C526), keyId: 7358762781874585605 } }, $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 'ubuntu2204-64-1-puppet7.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: 661f93db5e85a8b137c934dc
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("ba0519d9-3597-41cf-a69b-be46454ad18d") }, $clusterTime: { clusterTime: Timestamp(1713345495, 1), signature: { hash: BinData(0, 0366300688BA3AC78F5C49F7DCD1B6668F02C526), keyId: 7358762781874585605 } }, $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 'ubuntu2204-64-2-puppet7.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: 661f93e503d22e40b4c934dc
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("55789ac0-17a5-4e83-95ba-89d2acdb940e") }, $clusterTime: { clusterTime: Timestamp(1713345505, 1), signature: { hash: BinData(0, 9C0BFE838A4A42DB57F40268E79159FC2C256E45), keyId: 7358762781874585605 } }, $readPreference: { mode: "primaryPreferred" }, $db: "test" }
|
Run tests
Process completed with exit code 1.
|
The logs for this run have expired and are no longer available.
Loading