SystemD service stop behavior

Should "systemctl stop foo.service" stop all parent and child service processes?

Example: GlusterFS starts a service daemon (glusterd) and a brick daemon
(glusterfsd). When a user issues "systemctl stop glusterd" the service daemon is
stopped but the brick daemon is left running.

I have recently learned that it is expected behavior[1], but this seems to be a
defeat of the purpose of the stop command. What is @devel thoughts?

[1] <a href="" title=""></a>
[2] I did not contact JoeJulian as I feel this is a Fedora issue and not a
GlusterFS issue.


Re: SystemD service stop behavior

By Michal Schmidt at 10/23/2013 - 10:30

On 10/23/2013 04:09 PM, Michael Cronenworth wrote:
systemd allows this to be configured in the service's unit file.
See "man systemd.kill". glusterd.service uses "KillMode=process".


Re: SystemD service stop behavior

By Simo Sorce at 10/23/2013 - 10:25

On Wed, 2013-10-23 at 09:09 -0500, Michael Cronenworth wrote:
The justification here sounds wrong, if every package decides to
re-interpret the meaning of 'stop' as they please we quickly end up with
inconsistent behavior all over and diminish the usefulness of the
command, as people will not be able to just trust it and will have to go
around and test if it did what they asked for.

If glusterfs feels people need to run the bricks and the main daemons
separately then they should probably split service files and have a
dependency to bring one up when the other comes up, yet still be allowed
to take the daemon down w/o taking down the bricks.

Separate service files will make it clear you can operate on them

Fedora tries to push systemd service files upstream, I think you should
involve glusterfs people and explain what they are doing wrong.


Re: SystemD service stop behavior

By =?ISO-8859-2?Q?... at 10/23/2013 - 11:09

On 10/23/2013 04:25 PM, Simo Sorce wrote:
Either split it into more service or when I say stop, then stop everything you started.

Re: SystemD service stop behavior

By Kaleb S. KEITHLEY at 10/23/2013 - 11:41

On 10/23/2013 11:09 AM, Miroslav Suchý wrote:

Maybe people could be bothered to actually look at what's in the package?

There already is a separate glusterfsd.service file.

And it's a wonder to me why people who don't use it and don't know
anything about it would try to shoehorn it into some kind of
one-size-fits-all policy. It is the way it is because that's how the
users of it want it to work.

Re: SystemD service stop behavior

By Michael Cronenworth at 10/23/2013 - 11:57

Kaleb KEITHLEY wrote:
That unit file does not stop bricks either.

Perhaps I need to file the bug against the glusterfsd unit file?

Re: SystemD service stop behavior

By Kaleb S. KEITHLEY at 10/23/2013 - 15:04

On 10/23/2013 11:57 AM, Michael Cronenworth wrote:
Yes, you should certainly do that.

Re: SystemD service stop behavior

By Rich Megginson at 10/23/2013 - 10:31

On 10/23/2013 08:25 AM, Simo Sorce wrote:
<a href="" title=""></a>

Re: SystemD service stop behavior

By Ric Wheeler at 10/23/2013 - 10:10

On 10/23/2013 03:09 PM, Michael Cronenworth wrote:
I would suspect that this is something that the gluster team should look at