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

Returns exit code 0 in case of Mongo fail to start

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.0
    • Affects Version/s: 1.8.0-rc1
    • Component/s: Admin
    • Labels:
      None
    • Environment:
      Linux 2.6.37-ARCH #1 SMP PREEMPT Tue Mar 15 09:21:17 CET 2011 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ AuthenticAMD GNU/Linux
    • Linux

      In case of unclean shutdown mongo fail to start, but returns exit code 0.
      Exit code matters when used in startup scripts.
      Look at this piece of code from my ArchLinux's mongodb startup script. Here we try to start mongo an then check exit code. Mongo should return correct exit codes.
      [ -z "$PID" ] && /bin/su mongodb -s /bin/bash -c "/usr/bin/mongod --config /etc/mongodb.conf &" > /var/log/mongod 2>&1
      if [ $? -gt 0 ]; then
      stat_fail
      else
      add_daemon mongodb
      stat_done
      fi

            Assignee:
            brandon Brandon Diamond
            Reporter:
            jesu Artyom Bolshakov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: