Comment 57 for bug 1832182

Revision history for this message
Paride Legovini (paride) wrote :

I partially take it back: there's an easy way to do a graceful reload and that's by `systemctl reload apache2` (as Christoph mentioned, but I misinterpreted the package version he was referring to). I can confirm the error.log shows:

[pid 3014:tid 139989240114240] AH00493: SIGUSR1 received. Doing graceful restart

What doesn't work is `apache2ctl graceful`, which unconditionally calls `systemctl restart`. Excerpt from `apache2ctl`:

restart|graceful)
    if $HTTPD ${APACHE_ARGUMENTS} -t 2> /dev/null ; then
        if need_systemd; then
            # If running on systemd we should not directly restart httpd since
            # systemd would be confused about httpd's status.
            # (See LP: #1832182)
            echo "Invoking 'systemctl restart ${APACHE_SYSTEMD_SERVICE}'."
            echo "Use 'systemctl status ${APACHE_SYSTEMD_SERVICE}' for more info."
            systemctl restart "${APACHE_SYSTEMD_SERVICE}"

So we have a regression when `apache2ctl graceful` is called directly, which I think it's still a common thing, even if systemctl is to be preferred.