Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-559

Audit error messages for style and sense

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.0-rc8
    • Affects Version/s: None
    • Component/s: None
    • None
    • 2015-01 Iteration

      Going to try and organize the most common failure cases and make sure they make sense for each tool. Feel free to edit this description for more test cases:

      bsondump
      1. no bson file specified – good
      2. invalid options – good
      3. pointed to a non-bson file – bson files do not have a special header so there's no nicer way to determine its invalid than just going for it.

      mongodump
      1. unreachable db – good
      2. invalid options – good
      3. auth error – good
      4. broken pipe – can get EOF
      5. can't use repair cursor – good

      mongorestore
      1. unreachable db – good
      2. invalid options – good
      3. bad dump folder / no dump folder – could provide some kind of troubleshooting info. Overly verbose as it is.
      4. restoring without drop – hammers you with errors, but I'm not sure if there is a good way around this

      mongoexport
      1. invalid options – good
      2. broken pipe – sometimes gives "EOF"

      mongoimport
      1. bad headers – "2015-01-09T16:55:59.466-0500 Failed: incompatible fields found: 'a' and 'a.c'" could be more didactic
      2. invalid input – good
      3. no collection – prints 4 lines and assumes "" as the collection, which is a bit odd to read.

      mongotop/mongostat
      1. unreachable db – in mongotop, specifying a nonexistent hostname will result with: error determining if connected to mongos: error connecting to db server: no reachable servers
      2. broken pipe (EOF?) – handled decently well

            Assignee:
            kyle.erf Kyle Erf
            Reporter:
            kyle.erf Kyle Erf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: