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

Version 3.2 incorrect 'nojournal is not allowed when configsvr is specified' error when specifying nojournal=false

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Won't Fix
    • Affects Version/s: 3.2.7
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      Use this config file and try to start MongoDB 3.2:

      # cat /etc/mongodb.conf
      #
      # Automatically Generated by Chef, do not edit directly!
      #
       
      bind_ip = 0.0.0.0
      configsvr = true
      dbpath = /var/lib/mongodb
      fork = true
      journal = true
      logappend = true
      logpath = /var/log/mongodb/mongodb.log
      nojournal = false
      pidfilepath = /var/run/mongodb/mongodb.pid
      port = 27017
      replSet = s1Set
      rest = false
      smallfiles = false
      

      If I remove the nojournal = false line, everything works perfectly. However, this is bad functionality as it means my config files aren't as portable as they should be. Passing an option as false shouldn't be picked up by the error checking as if I was passing it as true.

      Show
      Use this config file and try to start MongoDB 3.2: # cat /etc/mongodb.conf # # Automatically Generated by Chef, do not edit directly! #   bind_ip = 0.0.0.0 configsvr = true dbpath = /var/lib/mongodb fork = true journal = true logappend = true logpath = /var/log/mongodb/mongodb.log nojournal = false pidfilepath = /var/run/mongodb/mongodb.pid port = 27017 replSet = s1Set rest = false smallfiles = false If I remove the nojournal = false line, everything works perfectly. However, this is bad functionality as it means my config files aren't as portable as they should be. Passing an option as false shouldn't be picked up by the error checking as if I was passing it as true.
    • Sprint:
      Sharding 16 (06/24/16), Sharding 17 (07/15/16)
    • Linked BF Score:
      0

      Description

      After installing MongoDB 3.2 it will not start, so checking status I get:

      # systemctl status mongodb -l
      ‚óŹ mongodb.service - SYSV: Mongo is a scalable, document-oriented database.
         Loaded: loaded (/etc/rc.d/init.d/mongodb)
         Active: failed (Result: exit-code) since Tue 2016-06-14 09:05:33 EDT; 8min ago
           Docs: man:systemd-sysv-generator(8)
        Process: 17722 ExecStop=/etc/rc.d/init.d/mongodb stop (code=exited, status=0/SUCCESS)
        Process: 17736 ExecStart=/etc/rc.d/init.d/mongodb start (code=exited, status=1/FAILURE)
       
      Jun 14 09:05:33 mdb32-rh7-s1-c1 systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
      Jun 14 09:05:33 mdb32-rh7-s1-c1 runuser[17740]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
      Jun 14 09:05:33 mdb32-rh7-s1-c1 mongodb[17736]: Starting mongod: 2016-06-14T09:05:33.273-0400 F CONTROL  [main] Failed global initialization: BadValue: nojournal is not allowed when configsvr is specified
      Jun 14 09:05:33 mdb32-rh7-s1-c1 runuser[17740]: pam_unix(runuser:session): session closed for user mongod
      Jun 14 09:05:33 mdb32-rh7-s1-c1 mongodb[17736]: [FAILED]
      Jun 14 09:05:33 mdb32-rh7-s1-c1 systemd[1]: mongodb.service: control process exited, code=exited status=1
      Jun 14 09:05:33 mdb32-rh7-s1-c1 systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
      Jun 14 09:05:33 mdb32-rh7-s1-c1 systemd[1]: Unit mongodb.service entered failed state.
      Jun 14 09:05:33 mdb32-rh7-s1-c1 systemd[1]: mongodb.service failed.
      

      Clearly showing that even passing nojournal=false is read by the error as passing nojournal=true. This is bad form. See next section for steps to reproduce.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-sharding Backlog - Sharding Team
              Reporter:
              engops@bluemedora.com Blue Medora EngOps
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: