[SERVER-36572] Command line --bind_ip should override bindIpAll in config file Created: 10/Aug/18  Updated: 29/Oct/23  Resolved: 17/Sep/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.0.0
Fix Version/s: 4.1.4

Type: Improvement Priority: Minor - P4
Reporter: NOVALUE Mitar Assignee: Sara Golemon
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-37099 Support canonicalizing options during... Closed
Documented
is documented by DOCS-12084 Docs for SERVER-36572: Command line -... Closed
Backwards Compatibility: Minor Change
Sprint: Platforms 2018-08-27, Platforms 2018-09-10, Platforms 2018-09-24
Participants:

 Description   

I have a config file where I have set:

net:
  bindIpAll: true

But if I then run;

/mongod --config /etc//mongod.conf --bind_ip 127.0.0.1

And check it with netstat -alpn, I can see that mongod is still listening on all IPs.



 Comments   
Comment by Githook User [ 17/Sep/18 ]

Author:

{'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}

Message: SERVER-36572 Enbironment::count() returns bool, not int.
Branch: master
https://github.com/mongodb/mongo/commit/d246e38f3dad15b9919773ffe6a2fa59288034f2

Comment by Githook User [ 17/Sep/18 ]

Author:

{'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}

Message: SERVER-36572 Canonicalize bindIpAll to bindIp=='*'
Branch: master
https://github.com/mongodb/mongo/commit/5c71b34bbe40040272f1174508366ff8a5668cbc

Comment by NOVALUE Mitar [ 10/Aug/18 ]

That is a surprise.

Is it possible from a command line to set bindIpAll: false?

Comment by Nick Brewer [ 10/Aug/18 ]

mitar Thanks for your report. I believe what you're seeing is expected - command line options only override the configuration file options that are their exact functional match, so --bind_ip would override another bindIp setting within the configuration file, but it does not change the state of the bindIpAll setting.

That said, I do think it would be an improvement to allow --bind_ip set from the command line to supplant the bindIpAll setting in the configuration file, so I'm re-categorizing this ticket as an improvement and passing it along to our Platforms team for consideration.

-Nick

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