Re: Native systemd unit for tsm client

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

 



 On 12/15/2011 10:38 AM, Thomas Moschny wrote:
2011/12/15 "Jóhann B. Guðmundsson"<johannbg@xxxxxxxxx>:
Hum that unit file looks a bit odd to me and does not work with TSM 6.3 on
F16 atleast not here
Not sure what you mean by "a bit odd". Isn't specifying "oneshot"
together with "RemainAfterExit" more odd in this case, where a deamon
(dsmcad) in fact keeps running? Is it possible to stop it with your
unit file?
pe
Nope nothing odd with specifying Type=oneshot together with RemainAfterExit=yes however having RemainAfterExit with Type=forking or Type=simple would be odd

Starting the unit...

# 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
root 7315 0.0 0.2 318976 4100 ? Sl 10:53 0:00 /usr/bin/dsmcad root 7325 0.0 0.0 109240 888 pts/0 S+ 10:53 0:00 grep --color=auto dsmcad tcp 0 0 0.0.0.0:51833 0.0.0.0:* LISTEN 7315/dsmcad tcp 0 0 0.0.0.0:1581 0.0.0.0:* LISTEN 7315/dsmcad

Stopping the unit

# systemctl stop 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: inactive (dead) since Thu, 15 Dec 2011 10:55:52 +0000; 6ms ago Process: 7312 ExecStart=/usr/bin/dsmcad (code=exited, status=0/SUCCESS)
      CGroup: name=systemd:/system/tsm-client.service


From where I'm standing I would consider that startup and shutdown of the unit as clean as it gets...


The one I posted works with 6.2.2 on Fedora 16 x86_64. The only "odd"
thing might be  that it doesn't use the pid file but cgroups to
control the daemon - which is a good thing anyway.

Why are you ignoring exit code of the start command which would otherwise normally be considered a failure?
There is no need for this line StandardOutput=syslog it's the default
You have Type=forking and GuessMainPID=no without having PIDFile= entry

The above seem odd to me about the unit file you are using

JBG
--
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