Support systemdctl daemon-reload for nodepool services

Otherwise, when we modify systemd unit files, we won't be able the use
them.

Change-Id: Ie2a383e771a4f6fe606614ed09134576ca5b6a66
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-01-18 09:05:39 -05:00
parent 078f336a01
commit aaa485a777
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
2 changed files with 22 additions and 0 deletions

View File

@ -72,6 +72,17 @@ class nodepool::builder(
content => template($builder_logging_conf_template),
}
if ($::operatingsystem == 'Ubuntu') and ($::operatingsystemrelease >= '16.04') {
# This is a hack to make sure that systemd is aware of the new service
# before we attempt to start it.
exec { 'nodepool-builder-systemd-daemon-reload':
command => '/bin/systemctl daemon-reload',
before => Service['nodepool-builder'],
subscribe => File['/etc/init.d/nodepool-builder'],
refreshonly => true,
}
}
service { 'nodepool-builder':
name => 'nodepool-builder',
enable => true,

View File

@ -66,6 +66,17 @@ class nodepool::launcher(
content => template($launcher_logging_conf_template),
}
if ($::operatingsystem == 'Ubuntu') and ($::operatingsystemrelease >= '16.04') {
# This is a hack to make sure that systemd is aware of the new service
# before we attempt to start it.
exec { 'nodepool-launcher-systemd-daemon-reload':
command => '/bin/systemctl daemon-reload',
before => Service['nodepool-launcher'],
subscribe => File['/etc/init.d/nodepool-launcher'],
refreshonly => true,
}
}
service { 'nodepool-launcher':
name => 'nodepool-launcher',
enable => true,