Re: Native systemd unit for tsm client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jóhann B. Guðmundsson" wrote:
> Nope nothing odd with specifying Type=oneshot together with
> RemainAfterExit=yes

Well, it is really odd to spacify oneshot if the service is actually a daemon.

> # systemctl start tsm-client.service && systemctl status
> tsm-client.service && ps aux | grep dsmcad && netstat -pant | grep
> dsmcad
> tsm-client.service - Tivoly Storage Manager Client
>        Loaded: loaded (/lib/systemd/system/tsm-client.service;
>        disabled)
>        Active: active (exited) since Thu, 15 Dec 2011 10:53:08 +0000;
>        8s ago
>       Process: 7312 ExecStart=/usr/bin/dsmcad (code=exited,
> status=0/SUCCESS)
>        CGroup: name=systemd:/system/tsm-client.service
>            └ 7315 /usr/bin/dsmcad

Notice the not-quite correct "active (exited)" state.
If PID 7315 dies unexpectedly, your service would still show up as active.

> You have Type=forking and GuessMainPID=no without having PIDFile=
> entry
> 
> The above seem odd to me about the unit file you are using

If dsmcad is indeed forking, the type is correct. Don't lie to systemd.
If dsmcad indeed creates no PID file, it's correct to not have the PIDFile= entry.
If the main PID guessing can go wrong (for double-forking daemons that can happen),
GuessMainPID=no is the right option to set.
I see nothing wrong with that.

Michal
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux