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

MSI installer produces incorrect config file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 4.2.3
    • Fix Version/s: 4.2.10, 4.4.1, 4.7.0, 4.0.21
    • Component/s: Packaging
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4, v4.2, v4.0, v3.6
    • Steps To Reproduce:
      Hide
      1. Run the MSI installer.
      2. On the configuration screen, enter some short paths for the database and logs (e.g. c:\data and c:\logs).
      3. The mongod.cfg file will be produced incorrectly, and the MongoDB service will be unable to start.

       

      Actual output (the remaining bytes of the file are not truncated):

      # mongod.conf
      # for documentation of all options, see:
      # http://docs.mongodb.org/manual/reference/configuration-options/
      # Where and how to store data.
      storage:
      {{ dbPath: C:\data\db}}
      {{ journal:}}
      {{ enabled: true}}
      # engine:
      # mmapv1:
      # wiredTiger:
      # where to write logging data.
      systemLog:
      {{ destination: file}}
      {{ logAppend: true}}
      {{ path: C:\ProgramData\MongoDB\log\mongod.log}}# network interfaces
      net:
      {{ port: 27017}}
      {{ bindIp: 127.0.0.1}}
      #processManagement:
      #security:
      #operationProfiling:
      #replication:
      #sharding:
      ## Enterprise-Only Options:
      #auditLog:
      #snmp:
      ditLog:
      #snmp:{{}}

      Show
      Run the MSI installer. On the configuration screen, enter some short paths for the database and logs (e.g. c:\data and c:\logs). The mongod.cfg file will be produced incorrectly, and the MongoDB service will be unable to start.   Actual output (the remaining bytes of the file are not truncated): # mongod.conf # for documentation of all options, see: # http://docs.mongodb.org/manual/reference/configuration-options/ # Where and how to store data. storage: {{ dbPath: C:\data\db}} {{ journal:}} {{ enabled: true}} # engine: # mmapv1: # wiredTiger: # where to write logging data. systemLog: {{ destination: file}} {{ logAppend: true}} {{ path: C:\ProgramData\MongoDB\log\mongod.log}} # network interfaces net: {{ port: 27017}} {{ bindIp: 127.0.0.1}} #processManagement: #security: #operationProfiling: #replication: #sharding: ## Enterprise-Only Options: #auditLog: #snmp: ditLog: #snmp: {{}}
    • Sprint:
      Dev Platform 2020-06-15, Dev Platform 2020-06-29

      Description

      The MSI installer has a custom screen on which the user can enter the path to data files and logs. The mongod.cfg file is produced based on the settings on this screen.

      If the user selects a shorter path of the log file or data directory than defaults, an incorrect config file is produced.

       

      I have provided a [PR #1355 on GitHub|https://github.com/mongodb/mongo/pull/1355] that should fix the issue (I wasn't able to build and test the installer, but I hope I fixed it correctly).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              acm Andrew Morrow
              Reporter:
              herceg.tomas@gmail.com Tomáš Herceg
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: