Remove local-scheduled-shutdown check
authorPeter Palfrader <peter@palfrader.org>
Wed, 9 Oct 2019 08:53:52 +0000 (10:53 +0200)
committerPeter Palfrader <peter@palfrader.org>
Wed, 9 Oct 2019 08:54:19 +0000 (10:54 +0200)
We had a cronjob that would run dsa-is-shutdown-scheduled every two
minutes and touch a file in /run that was then exposed via apache
as /shutdown-in-progress.  However, nothing appears to use this.
In particular, the fastly health checker uses /_health which is
backed by a service specific health service.

modules/apache2/files/local-scheduled-shutdown [deleted file]
modules/apache2/manifests/init.pp
modules/webserver/manifests/init.pp

diff --git a/modules/apache2/files/local-scheduled-shutdown b/modules/apache2/files/local-scheduled-shutdown
deleted file mode 100644 (file)
index 0689554..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<Directory /run/dsa/shutdown-marker>
-       Require all granted
-</Directory>
-Alias /shutdown-in-progress /run/dsa/shutdown-marker/shutdown-in-progress
index 64bf7ff..95ccf82 100644 (file)
@@ -170,6 +170,6 @@ class apache2(
   }
 
   apache2::config { 'local-scheduled-shutdown':
-    source => 'puppet:///modules/apache2/local-scheduled-shutdown',
+    ensure => 'absent',
   }
 }
index 19afd27..e5b9140 100644 (file)
@@ -1,12 +1,4 @@
 #
 class webserver {
        include webserver::defaultpage
-
-       file { '/etc/cron.d/puppet-export-scheduled-shutdown': ensure => absent, }
-       concat::fragment { 'puppet-crontab--webserver-export-shutdown':
-               target => '/etc/cron.d/puppet-crontab',
-               content  => @(EOF)
-                       */2 * * * * root mkdir -p /run/dsa/shutdown-marker; if dsa-is-shutdown-scheduled; then echo 'system-in-shutdown' > /run/dsa/shutdown-marker/shutdown-in-progress; else rm -f /run/dsa/shutdown-marker/shutdown-in-progress; fi
-                       | EOF
-       }
 }