Bug 1112416
| Summary: | mongodb init script status check does not work with bind_ip = 0.0.0.0 | |||
|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Jon Jozwiak <jjozwiak> | |
| Component: | mongodb | Assignee: | Flavio Percoco <fpercoco> | |
| Status: | CLOSED ERRATA | QA Contact: | Ami Jeain <ajeain> | |
| Severity: | high | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 4.0 | CC: | breeler, chrobert, fpercoco, sclewis, yeylon | |
| Target Milestone: | rc | Keywords: | Reopened | |
| Target Release: | 5.0 (RHEL 6) | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | mongodb-2.4.6-8.el6ost | Doc Type: | Bug Fix | |
| Doc Text: |
When using multiple IP addresses in the bind_ip option, mongodb's init script failed to parse the values, hence it was not possible to check the status of the mongod instance. This new package fixes that issue by considering multiple IP addresses and replacing the wildcard '0.0.0.0' with '127.0.0.1'
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1112840 (view as bug list) | Environment: | ||
| Last Closed: | 2014-07-28 18:47:20 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1112840 | |||
|
Description
Jon Jozwiak
2014-06-23 22:45:32 UTC
Is there anyway we can get this backported to RHOS4? Thanks, Chris Roberts @Chris, I'm planning to backport this to RHOS4. It won't probably get in until A5, though. I'll clone the bug now. 2.4.9-3.el7ost is on CDN so this is CLOSED->CURRENTRELEASE Actually this was for RHEL 6 variant, so moving back to MODIFIED failedQA: # sed -i -e 's#bind_ip.*#bind_ip = 0.0.0.0#g' /etc/mongodb.conf [root@rhos-compute-node-10 ~]# vim /etc/mongodb.conf [root@rhos-compute-node-10 ~]# service mongod restart Stopping mongod: [ OK ] Starting mongod: [ OK ] Waiting for mongod to become available: [FAILED] [root@rhos-compute-node-10 ~]# service mongod status mongod (pid 18871) is running... /etc/init.d/mongod: line 163: [: missing `]' /etc/init.d/mongod: line 163: 0.0.0.0: command not found listening on 0.0.0.0:27017 [root@rhos-compute-node-10 ~]# echo $? 1 # rpm -q mongodb mongodb-2.4.6-5.el6ost.x86_64 [ -z "$a" || "$a" = "0.0.0.0" ] should be [ -z "$a" -o "$a" = "0.0.0.0" ] Simple fix. Actually, there was a more subtle change required. Updating. Testing w/ 0.0.0.0: [root@localhost ~]# grep bind_ip /etc/mongodb.conf bind_ip = 0.0.0.0 [root@localhost ~]# service mongod stop Stopping mongod: [ OK ] [root@localhost ~]# service mongod status mongod is stopped [root@localhost ~]# service mongod start Starting mongod: [ OK ] Waiting for mongod to become available: [ OK ] [root@localhost ~]# service mongod status mongod (pid 16585) is running... listening on 0.0.0.0:27017 connection test successful Regression test against normal IP: [root@localhost ~]# grep bind_ip /etc/mongodb.conf bind_ip = 192.168.122.142 [root@localhost ~]# service mongod status mongod (pid 16757) is running... listening on 192.168.122.142:27017 connection test successful [root@localhost ~]# service mongod stop Stopping mongod: [ OK ] [root@localhost ~]# service mongod start Starting mongod: [ OK ] Waiting for mongod to become available: [ OK ] [root@localhost ~]# service mongod status mongod (pid 16873) is running... listening on 192.168.122.142:27017 connection test successful Why not check localhost, too? [root@localhost ~]# grep bind_ip /etc/mongodb.conf bind_ip = 127.0.0.1 [root@localhost ~]# service mongod stop Stopping mongod: [ OK ] [root@localhost ~]# service mongod start Starting mongod: [ OK ] Waiting for mongod to become available: [ OK ] [root@localhost ~]# service mongod status mongod (pid 17109) is running... listening on 127.0.0.1:27017 connection test successful Note: editing the IP while mongodb is running may not work; that is orthogonal to this bugzilla. Identical results on -8 RPM - only change is that if bind_ip is missing in mongodb.conf, we assume it's 0.0.0.0 instead of 127.0.0.1. verified. Indeed, you can't modify the conf file while the service is running. You have to stop it before ]# rpm -qa |grep mongodb mongodb-2.4.6-8.el6ost.x86_64 libmongodb-2.4.6-8.el6ost.x86_64 mongodb-server-2.4.6-8.el6ost.x86_64 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2014-0928.html |