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: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: Ralph Lange <ralph.lange at gmx.de>, EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Thu, 18 Jun 2020 08:37:38 -0700
On 6/18/20 5:35 AM, Ralph Lange via Tech-talk wrote:
> This is indeed a charming idea.
> 
> Please consider a few things, most important first.
> 
>   * Any telnet daemon inside the IOC will close the connection when the IOC goes down (reboots or crashes). The client will have to detect this, and act accordingly, e.g., go into a loop trying to reconnect.
>     This means that the client will not be able to see early boot messages that are printed before the daemon is up and the client connects. Please remember that back in vxWorks times, this was the main reason to not use the remote shell connection, but add terminal servers connected to the serial console.
>     The procServ daemon survives and keeps the clients connected, which will not miss a single byte of a new boot sequence.

Why not bake procServ into the IOC executable?  It could still fork()
off the a child process for the actual IOC, but without an execvp().
(or at worst, to re-exec the same executable)

Of course fork() from a multi-threaded process needs some care.
As well as attention to FD_CLOEXEC.


>   * This will obviously solve the remote connection part, not the restart.
>     Depending on the target platform, the restart will have to be done and configured very differently. This is lowering the portability of solutions.
>   * For TCP, the IOC should implement the telnet protocol. (How else deal with clients from systems with other end-of-line behavior?)
>   * procServ is using libtelnet, or compiling the libtelnet sources on platforms that don't offer it packaged.Consider supporting Linux domain sockets. These are named (no need to manage TCP-port-to-IOC assignments) and don't require telnet protocol.
>   *
>     What about Windows?
>     cygwin would offer a full Posix interface, but we just dropped it as a target platform.
> 
> 
> Just my 2cts...
> ~Ralph
> 


Attachment: signature.asc
Description: OpenPGP digital signature


Replies:
Re: How to run IOC in docker containers properly Ralph Lange 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
Re: How to run IOC in docker containers properly Konrad, Martin 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 Michael Davidsaver via Tech-talk
Re: How to run IOC in docker containers properly Ralph Lange via Tech-talk

Navigate by Date:
Prev: Re: How to run IOC in docker containers properly Mark Rivers via Tech-talk
Next: RE: Stepper motor with absolute encoder Pearson, Matthew R. 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 Ralph Lange via Tech-talk
Next: Re: How to run IOC in docker containers properly Ralph Lange 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, 18 Jun 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·