Please add native systemd units

Bug #1566519 reported by Timo Aaltonen
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apache2 (Debian)
Fix Released
Unknown
apache2 (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

I've ported apache to use native systemd units, and they work fine here, you can find a package with them integrated at

ppa:freeipa/ppa

I'll post the debdiff here too. Debian has some additional prepwork done in 2.4.18-2 for Deb:#798430 which would need to be merged too.

Tags: patch
Revision history for this message
Timo Aaltonen (tjaalton) wrote :
tags: added: patch
Changed in apache2 (Debian):
status: Unknown → New
Revision history for this message
Stefan Fritsch (sf-sfritsch) wrote :

From looking at the patch, I have a few comments/questions:

- Don't you have to name the service exactly like the init script, apache-htcacheclean, to make sure it overrides the init script?

- You should depend on network-online.target . Apache may not start if some IPs are not yet configured.

- I would not recommend graceful stop as default stop action. We had that in the init script for a while and it didn't work too well. From the changelog:

    Make the init script use normal 'stop' instead of 'graceful-stop' again:
    With graceful-stop, it can take a long time until all child processes have
    closed their listening sockets and there is no way for the init script to
    know when it is save to start apache again. This could make the restart of
    apache fail.

- You don't seem to support multiple instances, yet. Why do you call the service apache2@.service, then?

But I haven't tested it, yet.

Robie Basak (racb)
Changed in apache2 (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

trying to summarize what was discussed on irc last weekend:

- yes, apache-htcacheclean.service needs to have the same name, fixed it locally
- added network-online.target
- systemd has default timeout of 90 seconds after which the cgroup will be destroyed, so there should be no issue with slow processes hanging stop/shutdown for a long time
https://bugzilla.redhat.com/show_bug.cgi?id=1135122
and also
13:03 < sf> Though using KillMode=mixed with graceful-stop may still be a bad idea. Often, when killing apache with SIGKILL,
            stuff like sysv semaphores/shared memory stays around that may cause problems later on. OTOH, maybe it will be
            cleaned up when the cgroup is destroyed.

- apache2@.service is for instances to link to

Changed in apache2 (Debian):
status: New → Fix Released
Revision history for this message
Nish Aravamudan (nacc) wrote :

This was fixed in Debian in 2.4.23-5, which is in Zesty+.

Changed in apache2 (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.