jstests/concurrency/fsm_workload_helpers/server_types.js
/**
 * Returns true if the process is a mongod configsvr, and false otherwise.
 *
 */
Returns true if the process is a mongod configsvr, and false otherwise.
Returns true if the process is a mongod configsvr and false otherwise .
function isMongodConfigsvr(db) {
    if (!isMongod(db)) {
        return false;
    }
    var res = db.adminCommand('getCmdLineOpts');
    assert.commandWorked(res);
    return res.parsed && res.parsed.sharding && res.parsed.sharding.clusterRole === 'configsvr';
}
function isMongodConfigsvr ( db ) { if ( ! isMongod ( db ) ) { return false ; } var res = db . adminCommand ( 'getCmdLineOpts' ) ; assert . commandWorked ( res ) ; return res . parsed && res . parsed . sharding && res . parsed . sharding . clusterRole === 'configsvr' ; }
Returns true if the process is a mongod configsvr, and false otherwise.
Returns true if the process is a mongod configsvr and false otherwise .