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

mongodb 3.6.22 install fails if systemctl daemon is not running

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.6.22
    • Fix Version/s: 4.9.0, 4.4.5, 4.2.14, 4.0.25
    • Component/s: Packaging
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4, v4.2, v4.0
    • Steps To Reproduce:
      Hide

      docker run --rm -it --entrypoint=/bin/sh mongo:3.6
      > $ apt update
      > $ apt upgrade -y
      ...
      > Setting up mongodb-org-server (3.6.22) ...
      > Failed to connect to bus: No such file or directory
      > dpkg: error processing package mongodb-org-server (--configure):
      >  subprocess installed post-installation script returned error exit status 1
      > dpkg: dependency problems prevent configuration of mongodb-org:
      >  mongodb-org depends on mongodb-org-server; however:
      >   Package mongodb-org-server is not configured yet.

      Show
      docker run --rm -it --entrypoint=/bin/sh mongo: 3.6 > $ apt update > $ apt upgrade -y ... > Setting up mongodb-org-server ( 3.6 . 22 ) ... > Failed to connect to bus: No such file or directory > dpkg: error processing package mongodb-org-server (--configure): > subprocess installed post-installation script returned error exit status 1 > dpkg: dependency problems prevent configuration of mongodb-org: > mongodb-org depends on mongodb-org-server; however: > Package mongodb-org-server is not configured yet.
    • Sprint:
      Dev Platform 2021-02-22

      Description

      SERVER-52806 broke the installation on Docker images which have systemd installed without the daemon running, which is the case on the official mongo Docker image. That's why an upgrade or installation fails completely. Older versions likeĀ 3.6.21 can be installed without a problem.

      The problem lies in the postinstall script which assumes that if the systemctl binary is present the daemon must be running:

              # Check for changes to the service file
              if $(command systemctl --help >/dev/null); then
                  systemctl daemon-reload
              fi
      

      The result is the error

      Failed to connect to bus: No such file or directory

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ryan.egesdahl Ryan Egesdahl
              Reporter:
              philipp@trulson.de Philipp Trulson
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: