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 'centos7-64-1-puppet8.example.com' exited with 6 running:
puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_091600253.pp.Lhgb5j
Last 10 lines of output were:
�[mNotice: Compiled catalog for centos7-64-1-puppet8.example.com in environment production in 0.03 seconds
Info: Using environment 'production'
Info: Applying configuration version '1713345362'
�[mNotice: /Stage[main]/Main/Mongodb_replset[test]/ensure: created
Warning: Host centos7-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.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 'centos7-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: 661f9377287a1aa5b0c934dc
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('661f9378287a1aa5b0c934dd') } ], ordered: true, lsid: { id: UUID("6930c60d-8e91-489e-87b9-57eb5ccd8a70") }, txnNumber: 1, $clusterTime: { clusterTime: Timestamp(1713345395, 1), signature: { hash: BinData(0, 5D08795811D5D945F274B508C48FC39D49ED319B), keyId: 7358762352377856005 } }, $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 'centos7-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: 661f93782d60077600c934dc
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("08be00c3-0fab-41ef-b371-8fbec2f64d11") }, $clusterTime: { clusterTime: Timestamp(1713345395, 1), signature: { hash: BinData(0, 5D08795811D5D945F274B508C48FC39D49ED319B), keyId: 7358762352377856005 } }, $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 'centos7-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: 661f93823d19ef4b75c934dc
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("748d1cc1-676d-4eaf-8be0-19ed30fc8f12") }, $clusterTime: { clusterTime: Timestamp(1713345405, 1), signature: { hash: BinData(0, 54BF052EC6F5432D956B9C0C414F36203CD8B24A), keyId: 7358762352377856005 } }, $readPreference: { mode: "primaryPreferred" }, $db: "test" }
|
Run tests
Process completed with exit code 1.
|
Loading