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  2016  2017  2018  2019  <20202021  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  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: How to run IOC in docker containers properly
From: "Konrad, Martin via Tech-talk" <tech-talk at aps.anl.gov>
To: "J. Lewis Muir" <jlmuir at imca-cat.org>, "Johnson, Andrew N." <anj at anl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Wed, 17 Jun 2020 22:59:02 +0000
Hi,
> Just curious, why do you need procServ at all? You can run tmux (and
>  presumably Screen) as a systemd service if you want. You can run 
> tmux commands to start, stop, and restart an IOC.
Compared to screen and tmux, procServ is lighter and less complex. It
can also restart a crashed IOC process and it prevents users who are in
the habit of pressing Ctrl-C + Ctrl-D for logging out from accidentally
shutting down the IOC.

While we're at it I would like to propose a forth solution: How about
beefing up the IOC itself so it can listen on a socket for connections
to the IOC shell? This would come with a few advantages (some of them
might only apply to systems running systemd):

- No need to use procServ and friends anymore (less moving parts)

- Moving the IOC shell to a socket would free up stdout/stderr for
logging errors. We could use systemd to connect these file descriptors
to syslog and leverage more reliable protocols for transporting the data
to remote log servers like LogStash. This would put an end to annoying
messages emitted by some unhappy support module that floods the IOC
shell just because one of us forgot a "printf" somewhere in the code
which in the worst case might render the IOC shell useless.

- It would be transparent to the calling process if the IOC process
failed to start. In contrast if the IOC runs in procServ all the calling
process sees is that procServ started happily. That's not enough to
prevent systemd from starting other services which depend on the IOC or
to raise a red flag in a deployment tool.

- systemd allows fine-grained configuration of restart behavior:
on-failure/on-success/..., rate limiting with StartLimit etc.

Thoughts? Maybe a project for the upcoming online codeathon?

Martin

-- 
Martin Konrad
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: konrad at frib.msu.edu

Replies:
Re: How to run IOC in docker containers properly Johnson, Andrew N. via Tech-talk
Re: How to run IOC in docker containers properly Ben Franksen via Tech-talk
References:
How to run IOC in docker containers properly xiao zhang via Tech-talk
Re: How to run IOC in docker containers properly Johnson, Andrew N. via Tech-talk
Re: How to run IOC in docker containers properly Ben Franksen via Tech-talk
Re: How to run IOC in docker containers properly J. Lewis Muir via Tech-talk
Re: How to run IOC in docker containers properly Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: RE: EPICS across subnets Mark Rivers via Tech-talk
Next: Re: How to run IOC in docker containers properly Johnson, Andrew N. via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: How to run IOC in docker containers properly J. Lewis Muir via Tech-talk
Next: Re: How to run IOC in docker containers properly Johnson, Andrew N. via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 19 Jun 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·