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

Restart mongod upon RPM update conditionally

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Hide
      • install mongod RPM
      • ensure the service is disabled and not started
      • update the mongod server RPM
      • observe that the mongod process is started, with the service still being disabled

      This was tested on Amazon Linux 2, but should hold true on other distros using the RPM.

      Show
      install mongod RPM ensure the service is disabled and not started update the mongod server RPM observe that the mongod process is started, with the service still being disabled This was tested on Amazon Linux 2, but should hold true on other distros using the RPM.

      In the RPM spec the mongod service is (re)started upon an update, no matter if mongod service is running or not:
      https://github.com/mongodb/mongo/blob/49d34008db892e6a89498ecdd68fcd26e1d7ffab/rpm/mongodb-org.spec#L284

      With help of systemctl is-active this can be changed to restart only a running mongod service:

      /usr/bin/systemctl is-active --quiet mongod && /usr/bin/systemctl restart mongod
      

            Assignee:
            ryan.egesdahl@mongodb.com Ryan Egesdahl (Inactive)
            Reporter:
            torsten.spindler@mongodb.com Torsten Spindler
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: