[SERVER-17337] RPM Init script breaks with quotes in yaml config file Created: 20/Feb/15 Updated: 05/Jan/18 Resolved: 25/Mar/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Packaging |
| Affects Version/s: | 3.0.0-rc8 |
| Fix Version/s: | 3.0.2, 3.1.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Ernie Hershey | Assignee: | Ernie Hershey |
| Resolution: | Done | Votes: | 1 |
| Labels: | build-planning | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||
| Operating System: | Linux | ||||||||||||||||||||||||||||||||
| Backport Completed: | |||||||||||||||||||||||||||||||||
| Sprint: | BUILD 1 04/03/15 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||
| Description |
|
As pointed out here |
| Comments |
| Comment by Githook User [ 30/Mar/15 ] | ||||
|
Author: {u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}Message: (cherry picked from commit 400dabd20809c561d8de21438d4bb7c682129641) | ||||
| Comment by Githook User [ 25/Mar/15 ] | ||||
|
Author: {u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}Message: | ||||
| Comment by Mitch McCracken [ 25/Mar/15 ] | ||||
|
i ran into this--what's worse is that it was creating a directory called " in my current path every time I started up a mongod instance because it thought it needed to create that pid directory. | ||||
| Comment by Eric Milkie [ 26/Feb/15 ] | ||||
|
As far as using mongod to validate and parse a config, you can kind of do this today, but it's not ideal. You can start mongod with a combination of command line parameters and config file parameters, and then once the server is started you can fetch the parsed JSON config via getCmdLineOpts. This depends on the server being able to start, however. | ||||
| Comment by Ernie Hershey [ 26/Feb/15 ] | ||||
|
I think a small change that would fix this would be to trim out quotes in these lines -
Replacing them with this:
| ||||
| Comment by Ernie Hershey [ 26/Feb/15 ] | ||||
|
That would be a good option although I worry about adding a dependency that might not be present on enough systems. I was envisioning a way to call mongod or one of our tools to just spit out config options, since it's going to do the parsing ultimately anyways. like if I run:
it would just echo the value and not do anything else. | ||||
| Comment by Eric Milkie [ 20/Feb/15 ] | ||||
|
Is there a YAML parser we can use instead of trying to fake it with awk? |