Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-17546

RHEL init.d script does not handle pidFilePath with quotes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide
      1. Install MongoDB 3.0.0 under RHEL 6
      2. Set the pidFilePath in a YAML formatted mongod.conf file as follows

        processManagement:
            pidFilePath: "/var/run/mongodb/mongod.pid"
        

      3. Start mongod

        sudo service mongod start
        

      4. Stop mongod

        sudo service mongod stop
        // This service command will fail
        

      Show
      Install MongoDB 3.0.0 under RHEL 6 Set the pidFilePath in a YAML formatted mongod.conf file as follows processManagement: pidFilePath: "/var/run/mongodb/mongod.pid" Start mongod sudo service mongod start Stop mongod sudo service mongod stop // This service command will fail

      Description

      The RHEL mongod init.d script will fail to shut down mongod when the value of processManagement.pidFilePath is set to a quoted string. This occurs because the quote characters are interpreted by the script as part of the filename and no match is found for the pid file. For example, stopping/restarting mongod fails with the following format:

      processManagement:
          pidFilePath: "/var/run/mongodb/mongod.pid"
      

      and succeeds when the quotes are removed:

      processManagement:
          pidFilePath: /var/run/mongodb/mongod.pid
      

      YAML formatted strings can be represented with single quotes, double quotes or no quotes when leading/trailing space truncation is not an issue. We should handle all cases in our init.d script.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              james.wahlin James Wahlin
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: