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

systemd unit mongod.service should use "After=network-online.target"

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.8.0, 4.4.2
    • None
    • Stability
    • None
    • Minor Change
    • v4.7, v4.4
    • Dev Platform 2020-09-21, Dev Platform 2020-10-05

    Description

      Currently the systemd unil file mongod.service waits for the network.target to be reached, via the line After=network.target. However, most Linux distributions with systemd support network-online.target, which is a better indicator that the network is up and available for MongoDB. When only waiting on network.target, it is possible that the mongod service fails to start upon system reboot.

      See this systemd documentation page for a more detailed explanation.

      We suggest changing the mongod.service file to specify:

      After=network-online.target network.target
      

      Attachments

        Activity

          People

            ryan.egesdahl@mongodb.com Ryan Egesdahl (Inactive)
            spencer.brown@mongodb.com Spencer Brown
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: