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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1832182

Title:
  systemd unable to detect running apache if invoked via "apache2ctl
  graceful"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1832182/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to