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
          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
          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

          (cherry picked from commit f7414114d89d7c07ee1f2282290897ddbd27985c)
          Branch: v3.2
          https://github.com/mongodb/mongo/commit/1f08e9e1df52253cb303f20028c2f7089ab97d16

          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 (cherry picked from commit f7414114d89d7c07ee1f2282290897ddbd27985c) Branch: v3.2 https://github.com/mongodb/mongo/commit/1f08e9e1df52253cb303f20028c2f7089ab97d16
          Hide
          cloudkitten_ Ewald van Geffen added a comment - - edited

          I experience problems on CentOS7 with the sysvinit compability generators. As quickfix I simply copied the broken systemd generated file and manually fixed and copied it into the right place. The problem was with over 100 PHP-FPM pools the After= statement would be so long it somehow resulted strange issues.

          ● mongod.service - SYSV: Mongo is a scalable, document-oriented database.
             Loaded: error (Reason: Bad message)
             Active: inactive (dead)
               Docs: man:systemd-sysv-generator(8)
          

          Jul 29 14:08:13 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:8] Failed to add dependency on php-fp, ignoring: Invalid argument
          Jul 29 14:08:13 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:9] Missing '='.
          Jul 29 14:23:25 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:8] Failed to add dependency on php-fpm-crokycup, ignoring: Invalid argument
          Jul 29 14:23:25 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:9] Missing '='.
          Jul 29 15:35:57 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:8] Failed to add dependency on p, ignoring: Invalid argument
          Jul 29 15:35:57 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:9] Missing '='.
          Jul 29 15:45:55 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:8] Failed to add dependency on php-fpm-remu, ignoring: Invalid argument
          Jul 29 15:45:55 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:9] Missing '='.
          Jul 29 15:47:26 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:8] Failed to add dependency on php-fpm-wi, ignoring: Invalid argument
          Jul 29 15:47:26 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:9] Missing '='.
          

          I feel it's better if we can provide native upstart files. Contact me if you need more additional information as this is very much reproducible.

          Show
          cloudkitten_ Ewald van Geffen added a comment - - edited I experience problems on CentOS7 with the sysvinit compability generators. As quickfix I simply copied the broken systemd generated file and manually fixed and copied it into the right place. The problem was with over 100 PHP-FPM pools the After= statement would be so long it somehow resulted strange issues. ● mongod.service - SYSV: Mongo is a scalable, document-oriented database. Loaded: error (Reason: Bad message) Active: inactive (dead) Docs: man:systemd-sysv-generator(8) Jul 29 14:08:13 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:8] Failed to add dependency on php-fp, ignoring: Invalid argument Jul 29 14:08:13 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:9] Missing '='. Jul 29 14:23:25 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:8] Failed to add dependency on php-fpm-crokycup, ignoring: Invalid argument Jul 29 14:23:25 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:9] Missing '='. Jul 29 15:35:57 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:8] Failed to add dependency on p, ignoring: Invalid argument Jul 29 15:35:57 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:9] Missing '='. Jul 29 15:45:55 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:8] Failed to add dependency on php-fpm-remu, ignoring: Invalid argument Jul 29 15:45:55 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:9] Missing '='. Jul 29 15:47:26 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:8] Failed to add dependency on php-fpm-wi, ignoring: Invalid argument Jul 29 15:47:26 kitty.be systemd[1]: [/run/systemd/generator.late/mongod.service:9] Missing '='. I feel it's better if we can provide native upstart files. Contact me if you need more additional information as this is very much reproducible.
          Hide
          ramon.fernandez Ramon Fernandez added a comment -

          Ewald van Geffen, can you please open a separate ticket and provide the diff of the changes you made? That will help investigating this issue.

          Thanks,
          Ramón.

          Show
          ramon.fernandez Ramon Fernandez added a comment - Ewald van Geffen , can you please open a separate ticket and provide the diff of the changes you made? That will help investigating this issue. Thanks, Ramón.

            People

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

              Dates

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

                  Agile