diff --git a/el9/values.yaml b/el9/values.yaml index 6fb19fdb309082d178a5e1ce076c7e27464e55d2..9da70a36b712e1cf9ed7378f3567233fc95afac4 100644 --- a/el9/values.yaml +++ b/el9/values.yaml @@ -138,10 +138,9 @@ containers: - | function reload_apache_config { if [[ -e "${VHOST_READY_FILE}" && (! -e ${RELOAD_TIMESTAMP_FILE} || -n "$(find /etc/httpd/conf.d/vhost -cnewer ${RELOAD_TIMESTAMP_FILE})") ]]; then - # TODO: we need a way to monitor and alarm if Apache config is invalid, - # as this will require manual investigation and correction. - # cf. https://gitlab.cern.ch/webservices/webframeworks-planning/issues/51 - apachectl -t && \ + # Run syntax tests for configuration files. `-T` skips checking the vhost root folders on EOS. + # The root folder check can take several seconds and doesn't affect validity of the configuration, just prints a warning. + httpd -t -T && \ kill -USR1 $(cat /var/run/httpd.pid) && \ touch ${RELOAD_TIMESTAMP_FILE} fi @@ -153,7 +152,10 @@ containers: test -e "${VHOST_READY_FILE}" -a "${RELOAD_TIMESTAMP_FILE}" -nt "${VHOST_READY_FILE}" } # Note that we ignore any error reloading config, if config is invalid - # then Apache will just keep using the previous config. + # then Apache will just (silently) keep using the previous config. + # As of Nov 2024 it never happened that we generate an invalid httpd config; + # if this becomes a concern then see https://gitlab.cern.ch/webservices/webframeworks-planning/issues/51 + # for considerations regarding how to monitor and alarm if Apache config is invalid. reload_apache_config check_vhost_ready && check_web_request initialDelaySeconds: 10