EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: IOCs under procServ as system services under systemd?
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Mon, 27 Jun 2016 10:51:52 -0500
Has anybody produced a systemd unit file for running the caRepeater? I'm
sure it's trivial to write but it would be good to include a copy in
Base (the release process for 3.14.12.6 will be starting very soon).

Initially it seems that it couldn't be started using socket activation
since currently the code creates its own socket on TCP Port 5065 and the
systemd.socket docs say:

> Note that the daemon software configured for socket activation with
> socket units needs to be able to accept sockets from systemd, either
> via systemd's native socket passing interface (see sd_listen_fds(3)
> for details) or via the traditional inetd(8)-style socket passing
> (i.e. sockets passed in via standard input and output, using
> StandardInput=socket in the service file).

It should be possible to extend the CA Repeater client with an option to
accept an open socket, but I don't know how much work that would
involve, and it would have to be a 3.16 feature anyway.


Ralph,

Should Base include unit files for starting IOCs? I'm not sure if we'd
want one for procServ and another using GNU screen, or if the latter
would need a wrapper script anyway.

- Andrew


On 06/27/2016 09:38 AM, Konrad, Martin wrote:
> Hi all,
> Niklas and Stefani, thanks for sharing your systemd unit configuration.
> It came just at the right time :-) I put together a similar one. Using
> the foreground option (-f) of procServ is the recommended way with
> systemd. My unit configuration [1] differs in some details:
> 
>> ConditionFileIsExecutable=/usr/bin/procServ 
>> ConditionFileIsExecutable=/usr/local/ops/iocBoot/ioccontrol/st.cmd
> This causes systemd to silently skip the service if one of these files
> is not executable. Stefani, are you sure that's the behavior you want? I
> would prefer it to fail with an error message instead (remove these two
> lines).
> 
> I'm using "Restart=always" to make sure procServ is restarted
> automatically even if it exited cleanly. I don't want users to find out
> that they are not able to restart procServ after they shut it down by
> pressing Ctrl-Q.
> 
> Note how systemd makes our life as developers easier: Daemons don't need to
> - fork
> - write PID files
> - drop privileges by themselves
> Systemd takes care of all these things for us :-)
> 
> Cheers,
> 
> Martin
> 
> [1]
> https://stash.nscl.msu.edu/projects/DEPLOY/repos/puppet_module_epics_softioc/browse/templates/etc/systemd/system/ioc.service
> 

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

References:
IOCs under procServ as system services under systemd? Ralph Lange
Re: IOCs under procServ as system services under systemd? Niklas Claesson
Re: IOCs under procServ as system services under systemd? Konrad, Martin

Navigate by Date:
Prev: Re: IOCs under procServ as system services under systemd? Konrad, Martin
Next: Re: question of data conversion Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: IOCs under procServ as system services under systemd? Konrad, Martin
Next: Re: IOCs under procServ as system services under systemd? Konrad, Martin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·