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 2020 2021 2022 2023 2024 2025 | 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 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Automatic IOC configuration loading |
From: | Bruce Hill <[email protected]> |
To: | Bruno Seiva Martins <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Thu, 7 Mar 2013 15:42:51 -0800 |
Hi Bruno, We use a system similar to your solution 1. We have over 100 diskless linux x86 based host systems that all boot using DHCP and PXE. In the diskless images, (we use a slightly different image for each of our 6 experimental areas), we add an init.d file. % cat /etc/init.d/ioc #!/bin/bash if [ -x /reg/d/iocCommon/hosts/$HOSTNAME/startup.cmd ]; then /reg/d/iocCommon/hosts/$HOSTNAME/startup.cmd exit 0 fi There are also 3 soft links under /etc/rc.d to control when /etc/init.d/ioc runs: % ll /etc/rc.d/rc*/*ioc* lrwxrwxrwx 1 root root 13 Dec 10 2010 /etc/rc.d/rc3.d/S99ioc -> ../init.d/ioc* lrwxrwxrwx 1 root root 13 Dec 10 2010 /etc/rc.d/rc4.d/S99ioc -> ../init.d/ioc* lrwxrwxrwx 1 root root 13 Dec 10 2010 /etc/rc.d/rc5.d/S99ioc -> ../init.d/ioc* Each soft ioc host machine NFS mounts the /reg/d/iocCommon filesystem, which is also available on all our development systems. Thus, when each ioc host machine boots, it looks for and runs it's ioc host startup script if found. The host script is run as root, so that's where we put any special module or driver initialization. As we have 1 to N soft ioc's for each host, the host startup.cmd files also typically contain one or more lines like these: # Run the soft IOC startup.cmd scripts /reg/d/iocCommon/sioc/ioc-las-fiberOven/startup.cmd /reg/d/iocCommon/sioc/ioc-las-hist1/startup.cmd The sioc startup.cmd files run some common environment setup scripts, change to the appropriate ioc release directory, and use the linux runuser command to run the ioc st.cmd file as the appropriate ioc userid using procServ. When we want to update a soft ioc to a different version, we just edit it's startup.cmd file to cd to the new directory, kill the prior procServ, and use sudo to re-run the ioc startup.cmd file. We use a similar scheme for our VME hard ioc's, but they boot via BOOTP and TFTP, and use a TFTP startup script to search for and run the hard ioc's st.cmd file, again found via NFS and the ioc's hostname. This has worked well for us, making it relatively easy to manage over 500 soft ioc's running on over 100 host machines. The downside of this approach is that if your DHCP/NFS/PXE/BOOTP/TFTP server or servers are down, nothing boots. As our group supports end stations, and the central server's are needed to support the control room computers as well, this has been an acceptable tradeoff for us. Hope this helps, - Bruce On 03/06/2013 11:55 AM, Bruno Seiva Martins wrote:
-- Bruce Hill Member Technical Staff SLAC National Accelerator Lab 2575 Sand Hill Road M/S 10 Menlo Park, CA 94025 |