Enable automatic restart of memcached, apache and mongodb

Prior to Newton, HA deployments had automatic restart of non-Openstack
services on controller nodes. From Newton onward, after we switched to
systemd for the vast majority of services, Openstack services are
configured for automatic restart, but memcached apache and mongodb
lack it.

Generate a drop-in file for the mentioned services, so they can
restart automatically in both HA and non-HA deployments.

Change-Id: I8576db193b358cf804e8aaeb0e05b31c635ae5ba
Closes-Bug: #1741263
This commit is contained in:
Damien Ciabrini 2018-01-04 15:27:45 +01:00
parent f9009b7d01
commit e84da28dc3
3 changed files with 18 additions and 0 deletions

View File

@ -35,6 +35,12 @@ class tripleo::profile::base::apache(
include ::apache::mod::status
include ::apache::mod::ssl
# Automatic restart
::systemd::dropin_file { 'httpd.conf':
unit => 'httpd.service',
content => "[Service]\nRestart=always\n",
}
if $enable_status_listener {
if !defined(Apache::Listen[$status_listener]) {
::apache::listen {$status_listener: }

View File

@ -67,5 +67,11 @@ class tripleo::profile::base::database::mongodb (
'MemoryLimit' => $memory_limit
}
}
# Automatic restart
::systemd::dropin_file { 'mongod.conf':
unit => 'mongod.service',
content => "[Service]\nRestart=always\n",
}
}
}

View File

@ -28,5 +28,11 @@ class tripleo::profile::base::memcached (
) {
if $step >= 1 {
include ::memcached
# Automatic restart
::systemd::dropin_file { 'memcached.conf':
unit => 'memcached.service',
content => "[Service]\nRestart=always\n",
}
}
}