There is another other twist. If the node is diskfull then there is a new site environment variable that we added, RUNBOOTSCRIPTS, which when set to "yes" will invoke the postbootscripts on the installation and each reboot of the node. If it is not set to "yes" then the postbootscripts will only be run on the initial boot and not on any reboots.
runbootscripts: If set to 'yes' the scripts listed in the postbootscripts
attribute in the osimage and postscripts tables will be
run during
each reboot of stateful (diskful) nodes. This attribute
has no
effect on stateless and statelite nodes. Please run the
following
command after you change the value of this attribute:
'updatenode <nodes> -P setuppostbootscripts'
John Simpson
HPC Clusters Systems Management
2455 South Road
Poughkeepsie, NY 12601-5400
email: [email protected] Phone Ext: 845-433-7917 Tie: 8-293-7917
Fax: 845-433-8363
From: Lissa Valletta/Poughkeepsie/IBM@IBMUS
To: xCAT Users Mailing list <[email protected]>,
Cc: [email protected]
Date: 01/04/2013 07:10 AM
Subject: Re: [xcat-user] Post BOOT scripts
When they run actually depends on the OS and whether it is a diskless or
diskfull install. Run man postscripts and look at the explanation of the
attributes. These script do run after install. My understanding was you
just wanted the script to do different things when run on boot and when run
from updatenode. Going back to your note, I see you want the script to
only run when booting and not to run on updatenode -P, but only when you
specifically run updatenode -P <script>. A couple of solutions come to
mind. Probably someone could think of something better.
Have two scripts, one in the postscripts table for boot and one not
in the postscripts table to run with updatenode. -P <scriptname>
Have a parameter that you input when you run updatenode to drive the
logic you want. You can run updatenode -P "script parm1 parm2.."
When you go on a node, look in /xcatpost/mypostscript. That is the script
we generate to run the postscripts. You will see all the exported
variables. We export every attribute in the site table plus others. So
if it helps you, you can add your own attributes to the site table to
drive your scripts. In 2.8 (next release) we opened up this interface
even more , you can read about it here, in the section on creating
templates.
https://sourceforge.net/apps/mediawiki/xcat/index.php?title=Updatenode_Performance_Enhancements
Lissa K. Valletta
8-3/B10
Poughkeepsie, NY 12601
(tie 293) 433-3102
Inactive hide details for Craig West ---01/03/2013 10:20:59 PM---Lissa, So
the only real difference between postscripts and posCraig West
---01/03/2013 10:20:59 PM---Lissa, So the only real difference between
postscripts and postbootscripts is
From: Craig West <[email protected]>
To: [email protected]
Date: 01/03/2013 10:20 PM
Subject: Re: [xcat-user] Post BOOT scripts
Lissa,
So the only real difference between postscripts and postbootscripts is
that postbootscripts don't get run during the kickstart phase, and only
after the first boot?
I was hoping there might be something that was more like a
postinstallscript - something that is only run after the machine has
been installed, and not via updatenode. Ideally it would still be a
postscript so that it can be run manually if required.
We could write a postscript that installs an initscript and deletes
itself after it is run.
> There is also one other option, when you run the script with
> updatenode, we export an environment variable in the mypostscript
> file which your script can check. This will tell it, it is being run
> by updatenode vs during install.
> UPDATENODE=1
> export UPDATENODE
>
> So you will see checks in our postscripts like the following to run
> different logic whether it is being run by updatenode or during install.
> You could put this check at the start of the script and exit when run by
> updatenode.
>
> if [ -n "$UPDATENODE" ] && [ $UPDATENODE -eq 1 ]; then
Ok, thanks this might be useful as a work around the problem. The only
issue I do see is that I won't be able to run the script manually
either... that is if I run updatenode <node> -P <script> I expect the
UPDATENODE variable will be set and thus my script will abort before
changes are made, which really means I'd be better off removing the
script from the postscripts table and just running it manually when the
node comes online - which is what I am looking to avoid.
Is there a list of other variables that are set that we can see to get
an idea of other tweaks we can do to our scripts?
Cheers,
Craig.
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user
<<inline: graycol.gif>>
------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812
_______________________________________________ xCAT-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xcat-user
