function _callIsMaster() {
        _clearLiveNodes();

        self.nodes.forEach(function(node) {
            try {
                var n = node.getDB('admin').runCommand({ ismaster: 1 });
                if (n.ismaster == true) {
                    self.liveNodes.master = node;
                }
                else {
                    node.setSlaveOk();
                    self.liveNodes.slaves.push(node);
                }
            }
            catch (err) {
                print("ReplSetTest Could not call ismaster on node " + node + ": " + tojson(err));
            }
        });

        return self.liveNodes.master || false;
    }
/**
     * Invokes the 'ismaster' command on each individual node and returns whether the node is the
     * current RS master.
     */
Invokes the 'ismaster' command on each individual node and returns whether the node is the
current RS master.
Invokes the ' ismaster ' command on each individual node and returns whether the node is the current RS master .
function _callIsMaster() {
        _clearLiveNodes();
        self.nodes.forEach(function(node) {
            try {
                var n = node.getDB('admin').runCommand({ ismaster: 1 });
                if (n.ismaster == true) {
                    self.liveNodes.master = node;
                }
                else {
                    node.setSlaveOk();
                    self.liveNodes.slaves.push(node);
                }
            }
            catch (err) {
                print("ReplSetTest Could not call ismaster on node " + node + ": " + tojson(err));
            }
        });
        return self.liveNodes.master || false;
    }
function _callIsMaster ( ) { _clearLiveNodes ( ) ; self . nodes . forEach ( function ( node ) { try { var n = node . getDB ( 'admin' ) . runCommand ( { ismaster : 1 } ) ; if ( n . ismaster == true ) { self . liveNodes . master = node ; } else { node . setSlaveOk ( ) ; self . liveNodes . slaves . push ( node ) ; } } catch ( err ) { print ( "ReplSetTest Could not call ismaster on node " + node + ": " + tojson ( err ) ) ; } } ) ; return self . liveNodes . master || false ; }
Invokes the 'ismaster' command on each individual node and returns whether the node is the
 current RS master.
Invokes the ' ismaster ' command on each individual node and returns whether the node is the current RS master .