Fix replset and sharding integration tests #591
Annotations
5 errors
Run tests:
spec/acceptance/replset_spec.rb#L212
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_222718474.pp.lneCpM
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 '1713652040'
�[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.85 seconds
|
Run tests:
spec/acceptance/replset_spec.rb#L241
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: 6624416e9808ca3828c934dc
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('6624416e9808ca3828c934dd') } ], ordered: true, lsid: { id: UUID("9b3d8c44-b5d3-4449-9bc8-fa0f94afc974") }, txnNumber: 1, $clusterTime: { clusterTime: Timestamp(1713652074, 1), signature: { hash: BinData(0, 30583F46C344C685F0F2F5AD1FE1070F8BB9DEAE), keyId: 7360079528653225989 } }, $readPreference: { mode: "primaryPreferred" }, $db: "test" }
|
Run tests:
spec/acceptance/replset_spec.rb#L245
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: 6624416e366bdc9ed7c934dc
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("778162d7-9b91-479a-b32e-9c53efe6f8da") }, $clusterTime: { clusterTime: Timestamp(1713652074, 1), signature: { hash: BinData(0, 30583F46C344C685F0F2F5AD1FE1070F8BB9DEAE), keyId: 7360079528653225989 } }, $readPreference: { mode: "primaryPreferred" }, $db: "test" }
|
Run tests:
spec/acceptance/replset_spec.rb#L251
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: 662441786720c0a75bc934dc
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("a1c08440-2383-4886-bd55-e16267ddb3e6") }, $clusterTime: { clusterTime: Timestamp(1713652084, 1), signature: { hash: BinData(0, 2F172E3A483C420BC3CDDB237555B263435077F2), keyId: 7360079528653225989 } }, $readPreference: { mode: "primaryPreferred" }, $db: "test" }
|
Run tests
Process completed with exit code 1.
|
Loading