[SERVER-24551] Version 3.2 incorrect 'nojournal is not allowed when configsvr is specified' error when specifying nojournal=false Created: 14/Jun/16  Updated: 06/Dec/22  Resolved: 19/Dec/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.2.7
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Blue Medora EngOps Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Won't Fix Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-27368 Balancer not working on 3.4 Closed
is related to SERVER-26487 mongod incorrectly allows config serv... Closed
is related to SERVER-25388 Use consistent options parsing to for... Closed
Assigned Teams:
Sharding
Operating System: ALL
Steps To Reproduce:

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)
Participants:
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.



 Comments   
Comment by Sheeri Cabral (Inactive) [ 19/Dec/19 ]

There's merit in having an error with conflicting parameters; should the server believe nojournal=false or configsvr=true.

Comment by Githook User [ 01/Sep/16 ]

Author:

{u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: Revert "SERVER-24551 Version 3.2 incorrect 'nojournal is not allowed when configsvr is specified' error when specifying nojournal=false"

This reverts commit 67680aae26d7734e899976d020018b9cad474671.
Branch: master
https://github.com/mongodb/mongo/commit/23b3b8da2dab5ca0f5a4e8ffbfd0bc9215b00b94

Comment by Githook User [ 01/Sep/16 ]

Author:

{u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: Revert "Revert "SERVER-24551 Version 3.2 incorrect 'nojournal is not allowed when configsvr is specified' error when specifying nojournal=false""

This reverts commit 82a188cc0a0b33badcc64f294908b1f629b0fb05.
Branch: master
https://github.com/mongodb/mongo/commit/62bcdb41c4b6a9b368ef48fc7f48ce1a18a4aea6

Comment by Githook User [ 10/Aug/16 ]

Author:

{u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: Revert "SERVER-24551 Version 3.2 incorrect 'nojournal is not allowed when configsvr is specified' error when specifying nojournal=false"

This reverts commit 67680aae26d7734e899976d020018b9cad474671.
Branch: master
https://github.com/mongodb/mongo/commit/82a188cc0a0b33badcc64f294908b1f629b0fb05

Comment by Spencer Brody (Inactive) [ 01/Aug/16 ]

If this ever gets backported https://github.com/mongodb/mongo/commit/750754153357481e40c498f1def3371af79f2309 should be backported as well

Comment by Githook User [ 07/Jul/16 ]

Author:

{u'name': u'Sam Dunietz', u'email': u'sam.dunietz@10gen.com'}

Message: SERVER-24551 Version 3.2 incorrect 'nojournal is not allowed when configsvr is specified' error when specifying nojournal=false
Branch: master
https://github.com/mongodb/mongo/commit/67680aae26d7734e899976d020018b9cad474671

Comment by Andy Schwerin [ 15/Jun/16 ]

The problem here is that the MongoDB options parser allows us easily to set constraints on what command line arguments and config file directives are incompatible with each other, but it is harder to say which flag values are incompatible with each other. As a result, the author of some prior patch forbade mentioning --nojournal and --configsvr in the same configuration, even if the requested setting of the values is compatible.

Generated at Thu Feb 08 04:06:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.