shell logs output of ReplicaSetMonitorWatcher with --quiet

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.2.10
    • Component/s: Shell
    • Server Tooling & Methods
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            Andreas Kohn
            Votes:
            17 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved: