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

Support systemd in future compatible distributions

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:

      Description

      Hello,
      I cannot start mongodb 2.2.0 on Fedora 17
      got the error
      Oct 05 12:59:50 Evkalipt runuser[1787]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
      Oct 05 12:59:50 Evkalipt mongod[1783]: Starting mongod: can't open [/var/log/mongo/mongod.log] for log file: errno:13 Permission denied
      Oct 05 12:59:50 Evkalipt runuser[1787]: pam_unix(runuser:session): session closed for user mongod

      permissions are ok for mongod user

      drwxr-xr-x. 2 mongod mongod 4096 Oct 5 12:41 /var/log/mongo
      rw-r----. 1 mongod mongod 0 Aug 28 22:42 mongod.log

      Thanks,
      Edouard

        Issue Links

          Activity

          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

          Message: SERVER-7285 SERVER-18329: add service file for debian packages
          Branch: master
          https://github.com/mongodb/mongo/commit/6f01e1c7555e39e3618953c3fc0a5c5c216be09b

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'} Message: SERVER-7285 SERVER-18329 : add service file for debian packages Branch: master https://github.com/mongodb/mongo/commit/6f01e1c7555e39e3618953c3fc0a5c5c216be09b
          Hide
          sam.kleinman Sam Kleinman added a comment - - edited

          After a thorough review of our own packaging infrastructure and the recommendations in packaging guidelines I have a couple of comments regarding this case:

          • The new packages for Debian 8 (jessie) that are currently in progress and covered by SERVER-18329 will use systemd service files to control the process, and will be a completely native systemd package.
          • RHEL7 and SUSE12 packages rely on the sysvinit->systemd compatibility layer. These processes start and stop MongoDB using the init script but the process is managed, to some extent, by systemd. As I understand it, the installation and upgrade process for RPM packages do not keep track of the state of the program, and as a result, there's no reliable or supported upgrade path that includes transitioning between init systems. As a result RHEL7 and SUSE12 packages will continue to use the sysvinit compatibility system.
          • In the future when we create packages for RHEL8 and SUSE13 and any other RPM distro that we package with that may use systemd, we can (and should) transition these packages to use native systemd process management. Additionally, following from the the work on SERVER-18329, we can and will package native systemd process control for all new Debian and Ubuntu based distributions moving forward.

          Based on this I'm going to go ahead and close this ticket, thanks for your patience!

          Show
          sam.kleinman Sam Kleinman added a comment - - edited After a thorough review of our own packaging infrastructure and the recommendations in packaging guidelines I have a couple of comments regarding this case: The new packages for Debian 8 (jessie) that are currently in progress and covered by SERVER-18329 will use systemd service files to control the process, and will be a completely native systemd package. RHEL7 and SUSE12 packages rely on the sysvinit->systemd compatibility layer. These processes start and stop MongoDB using the init script but the process is managed, to some extent, by systemd. As I understand it, the installation and upgrade process for RPM packages do not keep track of the state of the program, and as a result, there's no reliable or supported upgrade path that includes transitioning between init systems. As a result RHEL7 and SUSE12 packages will continue to use the sysvinit compatibility system. In the future when we create packages for RHEL8 and SUSE13 and any other RPM distro that we package with that may use systemd, we can (and should) transition these packages to use native systemd process management. Additionally, following from the the work on SERVER-18329 , we can and will package native systemd process control for all new Debian and Ubuntu based distributions moving forward. Based on this I'm going to go ahead and close this ticket, thanks for your patience!
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

          Message: SERVER-7285: future proof ubuntu packaging with regards to systemd
          Branch: master
          https://github.com/mongodb/mongo/commit/f7414114d89d7c07ee1f2282290897ddbd27985c

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'} Message: SERVER-7285 : future proof ubuntu packaging with regards to systemd Branch: master https://github.com/mongodb/mongo/commit/f7414114d89d7c07ee1f2282290897ddbd27985c
          Hide
          kostyasha Kanstantsin Shautsou added a comment - - edited

          RHEL7 and SUSE12 packages rely on the sysvinit->systemd compatibility layer. These processes start and stop MongoDB using the init script but the process is managed, to some extent, by systemd. As I understand it, the installation and upgrade process for RPM packages do not keep track of the state of the program, and as a result, there's no reliable or supported upgrade path that includes transitioning between init systems. As a result RHEL7 and SUSE12 packages will continue to use the sysvinit compatibility system.

          http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html#S3-RPM-INSIDE-PREUN-SCRIPT and https://fedoraproject.org/wiki/Packaging:Scriptlets
          Sysv script is really unreliable, it redirects any errors into dev/null. And the only one single sysv script that i have on all servers today. Would be very glad if el7 packaging would stop shipping it.
          Is there anything i can help with?

          Show
          kostyasha Kanstantsin Shautsou added a comment - - edited RHEL7 and SUSE12 packages rely on the sysvinit->systemd compatibility layer. These processes start and stop MongoDB using the init script but the process is managed, to some extent, by systemd. As I understand it, the installation and upgrade process for RPM packages do not keep track of the state of the program, and as a result, there's no reliable or supported upgrade path that includes transitioning between init systems. As a result RHEL7 and SUSE12 packages will continue to use the sysvinit compatibility system. http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html#S3-RPM-INSIDE-PREUN-SCRIPT and https://fedoraproject.org/wiki/Packaging:Scriptlets Sysv script is really unreliable, it redirects any errors into dev/null. And the only one single sysv script that i have on all servers today. Would be very glad if el7 packaging would stop shipping it. Is there anything i can help with?
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

          Message: SERVER-7285 SERVER-18329: add service file for debian packages

          (cherry picked from commit 6f01e1c7555e39e3618953c3fc0a5c5c216be09b)
          Branch: v3.2
          https://github.com/mongodb/mongo/commit/d7d5d7a1cc444e39c645631044fb1663cee46f4a

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'} Message: SERVER-7285 SERVER-18329 : add service file for debian packages (cherry picked from commit 6f01e1c7555e39e3618953c3fc0a5c5c216be09b) Branch: v3.2 https://github.com/mongodb/mongo/commit/d7d5d7a1cc444e39c645631044fb1663cee46f4a

            People

            • Votes:
              17 Vote for this issue
              Watchers:
              32 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                2 weeks, 4 days ago
                Date of 1st Reply:

                  Agile