[SERVER-13595] Red Hat init.d script error: YAML config file parsing Created: 15/Apr/14 Updated: 11/Jul/16 Resolved: 13/May/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Packaging |
| Affects Version/s: | 2.6.0 |
| Fix Version/s: | 2.6.6, 2.7.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jon Rangel (Inactive) | Assignee: | Ernie Hershey |
| Resolution: | Done | Votes: | 0 |
| Labels: | cap-ticket-needed | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Operating System: | Linux | ||||||||||||||||||||||||||||||||||||||||
| Backport Completed: | |||||||||||||||||||||||||||||||||||||||||
| Sprint: | Build Team 2.7.0, BUILD 2.7.1, BUILD 2.8.0-rc2 | ||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Description |
|
In 2.6, MongoDB now supports YAML configuration files. The /etc/rc.d/init.d/mongod script in the mongodb-org RPM package doesn't work because of the following line that parses the pidfile path from the config file:
The above line doesn't correctly parse YAML configuration files, so the init.d script is unable to retrieve the pidfile needed to stop the mongod service. The regex should be modified to cover both old and new style configuration files. The following works for YAML files:
|
| Comments |
| Comment by Githook User [ 18/Nov/14 ] | |
|
Author: {u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}Message: | |
| Comment by Githook User [ 13/May/14 ] | |
|
Author: {u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}Message: | |
| Comment by Ernie Hershey [ 16/Apr/14 ] | |
|
I think this slightly adjusted line will work for both cases. It depends on an advanced enough version of awk to understand IGNORECASE.
|