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

report fatal startup errors to console on a --fork when possible,

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Usability
    • Labels:
      None

      for example if the db path doesn't exist, the forked process stops almost immediately, but there is no indication outside the log file specified that this happened. it would be a nice-to-have to get that.

      it might be a bit tricky to do this with a universality to it. three approaches? :
      1) fork later. then more has happened that could have gone wrong.
      2) after forking, have the forking parent wait for a sentinel state from the child either that it is ok or not ok or still in initialization. once out of initialization the parent stops regardless, but perhaps with something to report.
      3) just pre-check some very common errors like no data directory – partial solution but trivial to do

      this brings up an interesting question of do we want an invocation with --fork to not return until init is completed anyway? i could see some advantages to that. i.e. i might have a script that after starting a mongod then wants to initiate the replica set; but maybe the mongod hasn't even started yet so i have to wait somehow.

            Assignee:
            Unassigned Unassigned
            Reporter:
            dwight@mongodb.com Dwight Merriman
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: