mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
puppet: Work around memcached SASL configuration path bug.
memcached 1.5.22 in Ubuntu 20.04 has a bug where it looks for its SASL configuration at /etc/sasl2/memcached.conf/memcached.conf instead of /etc/sasl2/memcached.conf. https://bugs.launchpad.net/ubuntu/+source/memcached/+bug/1878721 Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class zulip::memcached {
|
||||
include zulip::sasl_modules
|
||||
include zulip::systemd_daemon_reload
|
||||
|
||||
$memcached_packages = $::osfamily ? {
|
||||
'debian' => [ 'memcached', 'sasl2-bin' ],
|
||||
@@ -47,6 +48,24 @@ class zulip::memcached {
|
||||
source => 'puppet:///modules/zulip/sasl2/memcached.conf',
|
||||
notify => Service[memcached],
|
||||
}
|
||||
file { '/etc/systemd/system/memcached.service.d':
|
||||
ensure => directory,
|
||||
}
|
||||
file { '/etc/systemd/system/memcached.service.d/zulip-fix-sasl.conf':
|
||||
require => File['/etc/systemd/system/memcached.service.d'],
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
content => "\
|
||||
# https://bugs.launchpad.net/ubuntu/+source/memcached/+bug/1878721
|
||||
[Service]
|
||||
Environment=SASL_CONF_PATH=/etc/sasl2
|
||||
",
|
||||
notify => [
|
||||
Class['zulip::systemd_daemon_reload'],
|
||||
Service['memcached'],
|
||||
],
|
||||
}
|
||||
file { '/etc/memcached.conf':
|
||||
ensure => file,
|
||||
require => [
|
||||
@@ -61,5 +80,6 @@ class zulip::memcached {
|
||||
service { 'memcached':
|
||||
ensure => running,
|
||||
subscribe => File['/etc/memcached.conf'],
|
||||
require => Class['zulip::systemd_daemon_reload'];
|
||||
}
|
||||
}
|
||||
|
||||
5
puppet/zulip/manifests/systemd_daemon_reload.pp
Normal file
5
puppet/zulip/manifests/systemd_daemon_reload.pp
Normal file
@@ -0,0 +1,5 @@
|
||||
class zulip::systemd_daemon_reload {
|
||||
exec { 'sh -c "! command -v systemctl > /dev/null || systemctl daemon-reload"':
|
||||
refreshonly => true,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user