Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27159

shell logs output of ReplicaSetMonitorWatcher with --quiet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • 3.2.10
    • None
    • Shell
    • Server Tooling & Methods
    • ALL

    Description

      I'm trying to get the primary currently used by a specific replica set in a shell script.

      $ bin/mongo --host rs0/172.17.0.8,172.17.0.9,172.17.0.14 --quiet --eval 'var _s=rs.status(); if (typeof _s.members != "undefined") { _s.members.forEach(function (x) {if (x.stateStr=="PRIMARY") { print(x.name); }})}'
      2016-11-22T17:06:58.396+0000 I NETWORK  [thread1] Starting new replica set monitor for rs0/172.17.0.14:27017,172.17.0.8:27017,172.17.0.9:27017
      2016-11-22T17:06:58.397+0000 I NETWORK  [ReplicaSetMonitorWatcher] starting
      2016-11-22T17:06:58.400+0000 I NETWORK  [thread1] changing hosts to rs0/mongodb-0.mongodb.default.svc.cluster.local:27017 from rs0/172.17.0.14:27017,172.17.0.8:27017,172.17.0.9:27017
      mongodb-0.mongodb.default.svc.cluster.local:27017
      

      The info/network messages there shouldn't be there, but they are now mixed with the output from the javascript evaluation. Minimally these messages should be on stderr, so that they can be filtered out easily.

      Attachments

        Issue Links

          Activity

            People

              backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
              ankon Andreas Kohn
              Votes:
              17 Vote for this issue
              Watchers:
              23 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: