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

Auto-repair for packaged build

    • Type: Icon: Bug Bug
    • Resolution: Incomplete
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.4.4
    • Component/s: None
    • Labels:
      None
    • Environment:
      10gen stable build for Ubuntu 10.4
    • ALL

      If the database was not cleanly shutdown then the next start attempt outputs a message to the mongo log and mongodb does not start. This would typically happen in the system boot after the unclean shutdown.

      A subsequent attempt to start mongodb will start just fine but nothing has changed and the repair really should be run.

      Trying to do a repair manually is a pain. For example doing it via the shell requires that you 'use' every db and then call repair on that database when you actually want repair to be run on everything.

      Trying to use the command line 'mongod --repair' means working out how to supply the parameter for the config file, and then afterwards discovering that the repaired database files are now all owned by root. Sure combining sudo, su etc could just about pull it off but is very fiddly.

      A bigger picture question is "are there any circumstances where you would not want to do a repair"? I suspect maybe some slaving scenarios where the local data is not trusted on startup anyway.

      I propose there be a key in the config file defaulting to true (except for previous paragraph answers) that automatically runs --repair with the correct parameters and users on restart if there was an unclean shutdown.

            Assignee:
            Unassigned Unassigned
            Reporter:
            rogerbinns Roger Binns
            Votes:
            7 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: