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

Improve "no option found to get" error message text

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: 4.0.3
    • Fix Version/s: Backlog
    • Component/s: Shell
    • Labels:

      Description

      I attempted to execute the following against a sharded cluster:

      (byebug) client.use(:admin).command(getParameter: 1, featureCompatibilityVersion: 1)
      *** Mongo::Error::OperationFailure Exception: no option found to get ()
      

      Shell version:

      speed% mongo --port 29400
      MongoDB shell version v3.6.9
      connecting to: mongodb://127.0.0.1:29400/
      Implicit session: session { "id" : UUID("fcdf70ad-6fb0-4e84-b880-2d762d4030fb") }
      MongoDB server version: 4.0.4-92-ga3ed66ac2e
      WARNING: shell and server versions do not match
      Server has startup warnings: 
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] 
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] ** WARNING: Access control is not enabled for the database.
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          Read and write access to data and configuration is unrestricted.
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] 
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] ** WARNING: This server is bound to localhost.
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          Remote systems will be unable to connect to this server. 
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          Start the server with --bind_ip <address> to specify which IP 
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          addresses it should serve responses from, or with --bind_ip_all to
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          bind to all interfaces. If this behavior is desired, start the
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] **          server with --bind_ip 127.0.0.1 to disable this warning.
      2019-01-16T14:42:39.279-0500 I CONTROL  [main] 
      mongos> db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
      {
      	"ok" : 0,
      	"errmsg" : "no option found to get",
      	"operationTime" : Timestamp(1547668183, 1),
      	"$clusterTime" : {
      		"clusterTime" : Timestamp(1547668183, 1),
      		"signature" : {
      			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
      			"keyId" : NumberLong(0)
      		}
      	}
      }
      

      The phrase "no option found to get" is confusing for the following reasons:

      1. I requested to get a parameter, the error message talks about an option.
      2. "no option" seems to imply that I requested several, whereas I requested only one.
      3. Can I insert an option like I insert data, so that later this option would be "found"?

      A more clear message to me would be something like the following:

      • Unrecognized parameter "featureCompatibilityVersion"
      • Unknown parameter "featureCompatibilityVersion"

      A better yet message would say something like:

      • Parameter "featureCompatibilityVersion" is not supported for mongos

      Also, this error message came without a numeric code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-stm Backlog - Server Tooling and Methods (STM)
              Reporter:
              oleg.pudeyev Oleg Pudeyev
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: