diff options
author | dalyd <david.daly@mongodb.com> | 2016-12-12 16:18:21 -0500 |
---|---|---|
committer | dalyd <david.daly@mongodb.com> | 2016-12-14 17:06:46 -0500 |
commit | 1ab87806b9ad157bb205403f2c7e0226988af64f (patch) | |
tree | 7ec84c85deaf78f78a00185b311386493a340139 | |
parent | a3c646de9d0a9298137d479777e7543cf314cd60 (diff) | |
download | mongo-1ab87806b9ad157bb205403f2c7e0226988af64f.tar.gz |
SERVER-27350: Enable access control for microbenchmarks in Evergreen
(cherry picked from commit 0ed346641f43a31c750ba84b547f4317a4514136)
-rw-r--r-- | etc/perf.yml | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/etc/perf.yml b/etc/perf.yml index 3a4853180a2..90b93e55229 100644 --- a/etc/perf.yml +++ b/etc/perf.yml @@ -14,6 +14,16 @@ post: - command: attach.results params: file_location: src/report.json + - command: s3.put + params: + aws_key: ${aws_key} + aws_secret: ${aws_secret} + local_file: src/mongod.log + remote_file: ${project}/${build_variant}/${revision}/${task_id}/${version_id}/logs/mongod-${build_id}.log + bucket: mciuploads + permissions: public-read + content_type: ${content_type|text/plain} + display_name: mongod.log - command: shell.exec params: silent: true @@ -87,7 +97,15 @@ functions: sleep 5 # if we started a replset, initiate it and wait for it to become primary ./mongo --eval "if(db.isMaster().isreplicaset){rs.initiate(); assert.soon(function(){return db.isMaster().ismaster}, 'no primary')}" - echo "MONGOD STARTED." + + # benchRun() authenticates against the admin db, with a user that must has admin access. + # Note: This is possibly a legacy requirement from times when it would call serverStatus. + # Btw, when mongod is started without --auth, these should be harmless no-ops + ./mongo --eval "db.createUser({user: 'admin', pwd: 'password', roles:\ + [ { role: 'userAdminAnyDatabase', db: 'admin' },\ + {role: 'readWriteAnyDatabase', db: 'admin' } ] })"\ + admin + echo "MONGOD STARTED." "compare": - command: json.get params: @@ -173,17 +191,7 @@ functions: cd perf # give mongod a few seconds to start up so that we can connect. sleep 5 - ${perf_exec_wrapper} python benchrun.py --shell ../mongo -t ${threads} --trialCount 5 -f testcases/*.js --includeFilter ${includeFilter1} --includeFilter ${includeFilter2} --excludeFilter ${excludeFilter} --out perf.json --exclude-testbed - - command: s3.put - params: - aws_key: ${aws_key} - aws_secret: ${aws_secret} - local_file: src/mongod.log - remote_file: ${project}/${version_id}/${revision}/mongod-${task_id}.log - bucket: mciuploads - permissions: public-read - content_type: ${content_type|text/html} - display_name: mongod.log + ${perf_exec_wrapper} python benchrun.py --shell ../mongo -t ${threads} --trialCount 5 -f testcases/*.js --readCmd ${readCmd} --includeFilter ${includeFilter1} --includeFilter ${includeFilter2} --excludeFilter ${excludeFilter} --out perf.json --exclude-testbed --username admin --password password - command: "json.send" params: name: "perf" @@ -510,7 +518,7 @@ buildvariants: compile_flags: &compile_flags -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++ --release --ssl mongod_exec_wrapper: &exec_wrapper "numactl --physcpubind=4,5,6,7 -i 1" perf_exec_wrapper: &perf_wrapper "numactl --physcpubind=1,2,3 -i 0" - mongod_flags: "--storageEngine=inMemory --logpath ./mongod.log --fork --syncdelay 0 --setParameter ttlMonitorEnabled=false --setParameter diagnosticDataCollectionEnabled=false --inMemorySizeGB 16" + mongod_flags: "--storageEngine=inMemory --logpath ./mongod.log --fork --syncdelay 0 --setParameter ttlMonitorEnabled=false --setParameter diagnosticDataCollectionEnabled=false --inMemorySizeGB 16 --auth" project: &project perf-3.2 run_on: - "centos6-perf" @@ -534,7 +542,7 @@ buildvariants: compile_flags: *compile_flags mongod_exec_wrapper: *exec_wrapper perf_exec_wrapper: *perf_wrapper - mongod_flags: "--storageEngine=mmapv1 --logpath ./mongod.log --fork --syncdelay 0 --nojournal --setParameter ttlMonitorEnabled=false --setParameter diagnosticDataCollectionEnabled=false" + mongod_flags: "--storageEngine=mmapv1 --logpath ./mongod.log --fork --syncdelay 0 --nojournal --setParameter ttlMonitorEnabled=false --setParameter diagnosticDataCollectionEnabled=false --auth" project: *project run_on: - "centos6-perf" @@ -555,7 +563,7 @@ buildvariants: compile_flags: *compile_flags mongod_exec_wrapper: *exec_wrapper perf_exec_wrapper: *perf_wrapper - mongod_flags: "--replSet=test --storageEngine=inMemory --logpath ./mongod.log --fork --syncdelay 0 --setParameter ttlMonitorEnabled=false --inMemorySizeGB 16 --oplogSize 10000 --setParameter diagnosticDataCollectionEnabled=false " + mongod_flags: "--replSet=test --storageEngine=inMemory --logpath ./mongod.log --fork --syncdelay 0 --setParameter ttlMonitorEnabled=false --inMemorySizeGB 16 --oplogSize 10000 --setParameter diagnosticDataCollectionEnabled=false --auth" project: *project run_on: - "centos6-perf" @@ -572,7 +580,7 @@ buildvariants: compile_flags: *compile_flags mongod_exec_wrapper: *exec_wrapper perf_exec_wrapper: *perf_wrapper - mongod_flags: "--replSet=test --storageEngine=mmapv1 --logpath ./mongod.log --fork --syncdelay 0 --nojournal --setParameter ttlMonitorEnabled=false --oplogSize 100000 --setParameter diagnosticDataCollectionEnabled=false" + mongod_flags: "--replSet=test --storageEngine=mmapv1 --logpath ./mongod.log --fork --syncdelay 0 --nojournal --setParameter ttlMonitorEnabled=false --oplogSize 100000 --setParameter diagnosticDataCollectionEnabled=false --auth" project: *project run_on: - "centos6-perf" |