From 0a07a58254d1f1cdea9cd904e691e9ee552885e6 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 20 Dec 2023 20:16:28 -0800 Subject: Disable the slave LDAP backup using the right config file The cron job uses the slapd file, not the ldap file to configure itself, so disable the job there instead. This updates commit a27358df4 --- modules/openldap/manifests/slave.pp | 6 +++- modules/openldap/templates/ldap-slave.sysconfig | 38 ------------------------ modules/openldap/templates/slapd-slave.sysconfig | 38 ++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 39 deletions(-) delete mode 100644 modules/openldap/templates/ldap-slave.sysconfig create mode 100644 modules/openldap/templates/slapd-slave.sysconfig (limited to 'modules') diff --git a/modules/openldap/manifests/slave.pp b/modules/openldap/manifests/slave.pp index bbc65f48..ba0cfb9d 100644 --- a/modules/openldap/manifests/slave.pp +++ b/modules/openldap/manifests/slave.pp @@ -14,6 +14,10 @@ class openldap::slave($rid) inherits openldap { } Openldap::Config['/etc/sysconfig/ldap'] { - content => template('openldap/ldap-slave.sysconfig'), + content => template('openldap/ldap.sysconfig'), + } + + Openldap::Config['/etc/sysconfig/slapd'] { + content => template('openldap/slapd-slave.sysconfig'), } } diff --git a/modules/openldap/templates/ldap-slave.sysconfig b/modules/openldap/templates/ldap-slave.sysconfig deleted file mode 100644 index 6ac9055a..00000000 --- a/modules/openldap/templates/ldap-slave.sysconfig +++ /dev/null @@ -1,38 +0,0 @@ -# debug level for slapd -SLAPDSYSLOGLEVEL="0" -SLAPDSYSLOGLOCALUSER="local4" - -# SLAPD URL list -SLAPDURLLIST="ldap:/// ldaps:/// ldapi:///" - -# Config file to use for slapd -#SLAPDCONF=/etc/openldap/slapd.conf - -# Which user to run as -#LDAPUSER=ldap -#LDAPGROUP=ldap - -# Should file permissions on database files be fixed at startup. Default is yes -# FIXPERMS=no - -# Whether database recovery should be run before starting slapd in start -# (not strictly be necessary in 2.3). Default is no -# AUTORECOVER=yes - -# At what intervals to run ldap-hot-db-backup from cron, which will -# do hot database backups for all bdb/hdb databases, and archive -# unnecessary transaction logs, one of hourly,daily,weekly,monthly,yearly -# Default is daily -# Slave does not need a backup -RUN_DB_BACKUP=never - -# How many days to keep archived transaction logs for. This should be just -# greater than the backup interval on these files. Default is 7 -# KEEP_ARCHIVES_DAYS=7 - -# How many files slapd should be able to have open. By default, the process -# will inherit the default per-process limit (usually 1024), which may -# not be enough, so ulimit -n is run with the value in MAXFILES (which -# defaults to 1024 as well). 4096 is the maximum OpenLDAP will use without -# recompiling. -# MAXFILES=4096 diff --git a/modules/openldap/templates/slapd-slave.sysconfig b/modules/openldap/templates/slapd-slave.sysconfig new file mode 100644 index 00000000..9bff24ff --- /dev/null +++ b/modules/openldap/templates/slapd-slave.sysconfig @@ -0,0 +1,38 @@ +# debug level for slapd +SLAPDSYSLOGLEVEL="0" +SLAPDSYSLOGLOCALUSER="local4" + +# SLAPD URL list +SLAPDURLLIST="ldap:/// ldaps:/// ldapi:///" + +# Config file to use for slapd +#SLAPDCONF=/etc/openldap/slapd.conf + +# Which user to run as +#LDAPUSER=ldap +#LDAPGROUP=ldap + +# Should file permissions on database files be fixed at startup. Default is yes +# FIXPERMS=no + +# Whether database recovery should be run before starting slapd in start +# (not strictly be necessary in 2.3). Default is no +# AUTORECOVER=yes + +# At what intervals to run ldap-hot-db-backup from cron, which will +# do hot database backups for all bdb/hdb databases, and archive +# unnecessary transaction logs, one of hourly,daily,weekly,monthly,yearly +# Default is daily +# Slave does not need a backup +RUN_DB_BACKUP=never + +# How many days to keep archived transaction logs for. This should be just +# greater than the backup interval on these files. Default is 7 +# KEEP_ARCHIVES_DAYS=7 + +# How many files slapd should be able to have open. By default, the process +# will inherit the default per-process limit (usually 1024), which may +# not be enough, so ulimit -n is run with the value in MAXFILES (which +# defaults to 1024 as well). 4096 is the maximum OpenLDAP will use without +# recompiling. +# MAXFILES=4096 -- cgit v1.2.1