Open
Description
Hi,
Got a problem with apache ocf agent, on Debian (but I don't think it's distribution specific). After a fresh reboot, the agent couldn't start apache, with this in daemon.log :
ERROR: AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf: Invalid Mutex directory in argument file:/var/lock/apache2
The directory /var/lock is a symbolic link to /run/lock, which is a tmpfs, that varnishes on reboot. So "/var/lock/apache2" must be created before launching apache2 tool.
For info, when launching Apache2 using apache2ctl, it creates the directory.
Here is a proposed patch :
--- apache.ori 2018-06-02 16:53:08.467570406 +0200
+++ apache 2018-06-02 17:04:56.212059045 +0200
@@ -204,6 +204,17 @@
validate_default_config || return $OCF_ERR_CONFIGURED
+ if [ ! -z "${APACHE_RUN_DIR}" ] && [ ! -d "${APACHE_RUN_DIR}" ]
+ then
+ mkdir -p "${APACHE_RUN_DIR}"
+ fi
+
+ if [ ! -z "${APACHE_LOCK_DIR}" ] && [ ! -d "${APACHE_LOCK_DIR}" ]
+ then
+ mkdir "${APACHE_LOCK_DIR}"
+ chown "${APACHE_RUN_USER}" "${APACHE_LOCK_DIR}"
+ fi
+
if [ -z $PIDFILE_DIRECTIVE ]; then
ocf_run $HTTPD $HTTPDOPTS $OPTIONS -f $CONFIGFILE
else
Metadata
Metadata
Assignees
Labels
No labels