Alexandros Kosiaris has submitted this change and it was merged.

Change subject: otrs: Ship systemd unit file for OTRS Daemon
......................................................................


otrs: Ship systemd unit file for OTRS Daemon

OTRS 5.0.1 expanded more on the concept of the OTRS scheduler and
improved into an all generic Daemon. Remove the scheduler systemd unit
file present in OTRS 4.0.x and replace it with the OTRS daemon.
The daemon is also responsible for all cron jobs done in the past by the
various cronjobs so remove all of those as well

Change-Id: I789dd446efc5d5e20199d3cc50c9b0058b2863ed
---
M modules/otrs/manifests/init.pp
R modules/otrs/templates/initscripts/otrs-daemon.systemd.erb
2 files changed, 16 insertions(+), 17 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/otrs/manifests/init.pp b/modules/otrs/manifests/init.pp
index f16631c..de3e842 100644
--- a/modules/otrs/manifests/init.pp
+++ b/modules/otrs/manifests/init.pp
@@ -95,14 +95,6 @@
         content => template('otrs/Config.pm.erb'),
     }
 
-    file { '/etc/cron.d/otrs':
-        ensure => 'file',
-        owner  => 'root',
-        group  => 'root',
-        mode   => '0444',
-        source => 'puppet:///modules/otrs/crontab.otrs',
-    }
-
     file { '/opt/otrs/bin/otrs.TicketExport2Mbox.pl':
         ensure => 'file',
         owner  => 'otrs',
@@ -137,7 +129,12 @@
     # should not bite back as after the move the 3.2.x install we have will be
     # decomissioned
     if os_version('debian >= jessie') {
-        base::service_unit { 'otrs-scheduler':
+        # TODO: Remove this after the migration to 5.0.x is complete
+        file { '/etc/cron.d/otrs':
+            ensure => absent,
+        }
+
+        base::service_unit { 'otrs-daemon':
             ensure  => present,
             upstart => false,
             systemd => true,
@@ -148,12 +145,14 @@
                 hasrestart => false,
             }
         }
-        # OTRS normally ships a watchdog scheduler cron entry that watches the
-        # scheduler and restarts it if it dies. That mode unfortunately is not
-        # compatible with systemd. Purge the scheduler and rely on systemd to
-        # watch over the scheduler
-        file { '/etc/cron.d/otrs-scheduler':
-            ensure => absent,
+    }
+    else {
+        file { '/etc/cron.d/otrs':
+            ensure => 'file',
+            owner  => 'root',
+            group  => 'root',
+            mode   => '0444',
+            source => 'puppet:///modules/otrs/crontab.otrs',
         }
     }
 }
diff --git a/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb 
b/modules/otrs/templates/initscripts/otrs-daemon.systemd.erb
similarity index 67%
rename from modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb
rename to modules/otrs/templates/initscripts/otrs-daemon.systemd.erb
index c26304e..323faad 100644
--- a/modules/otrs/templates/initscripts/otrs-scheduler.systemd.erb
+++ b/modules/otrs/templates/initscripts/otrs-daemon.systemd.erb
@@ -10,8 +10,8 @@
 RestartSec=2s
 TimeoutStopSec=60
 Type=forking
-ExecStart=/opt/otrs/bin/otrs.Scheduler.pl -a start --force
-ExecStop=/opt/otrs/bin/otrs.Scheduler.pl -a stop --force
+ExecStart=/opt/otrs/bin/otrs.Daemon.pl start --force
+ExecStop=/opt/otrs/bin/otrs.Daemon.pl stop --force
 
 [Install]
 WantedBy=multi-user.target

-- 
To view, visit https://gerrit.wikimedia.org/r/249123
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I789dd446efc5d5e20199d3cc50c9b0058b2863ed
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to