[Cook] new cook_rsh version
Jerry Pendergraft
jerry at endocardial.com
Thu Aug 19 04:52:08 EST 2004
I am planning to include a new version of cook_rsh in the next cook
release. This adds some new features and lays the groundwork so that
both cook_rsh and arch_hosts (ae_hosts) can use the same data to determine
suitable hosts for all remote jobs inlcuding aegis integration steps.
The reasons for the new version include:
- convert to a perl module which is more modern (and faster) and allows
the common code to be contained in the module.
- allow specification of times that a machine is (or is not
available) rather that a cold on/off as now with the exclude
file. Also this brings all the config info into just the one file.
The distributed cook_rsh allowed a .conf file that was "compiled" into the
sitehosts.pl but as I understand it many users prefered to simply
edit the sitehosts.pl.
The new version has moved from the require "sitehosts.pl" to the more
modern use Sitehosts. The machine data is provided in a Sitehosts.conf
file and the hostconf program used to "compile" a Sitehosts.pm file.
That resulting perl module is much more complex than the old sithosts.pl
file and people probably won't want to edit it. But the Sitehosts.conf
file is easy to maintain and generate a new one anyway.
The format of the Sitehosts.conf file is given below, and I would like
feedback on it. In particular thoughts on the timerange features
- I accept "timerange" or "allow" for times of OK to use and "exclude" for
times to refuse usage. I am wondering if "timerange" is superfluous and
to simply have "allow" or "exclude"?
- I have allowed shorthand definitions for common time periods, Daytime
and Night. Are there other or better keywords that would better cover
multi-shift work or other needs?
- I have considered adding (in a next version) the capability to specify
different time ranges for different days, such as Fri:10-18
and some shorthand for those such as Weekday (9-5 mon-fri), Weekend etc.
Is there use for that, or would it just be fluff?
---- format ----
Blank lines and lines beginning with "hash mark" (#) are ignored
"hash mark" (#) to end of line is a comment
Keywords: operations, architecture, host, Daytime, Night all
Operations must be defined first, there are no defaults
A reasonable set for and aegis project might be:
operations = Build, Compile, Link, Test
Architectures are defined, each with list of hosts and their
capabilities
- Use architecture keyword followed by architecture name
architecture sun4-SunOS-5.8
- Use host keyword followed by host name followed by operation[s] or "all"
- keyword all means it can do all operations at default preference
host arizona all
- Use operation names to restrict host use to specific operations
host idaho Build, Compile # only build and/or compile
- Use optional "preference" factors to give machine more or less work
preference factor is relative to the default value
host texas Build, Compile 2.0, Link 2.5 # can do twice the compiles
host ohio Build, Compile 0.8, Test 1.5 # only 80% compiles
- keyword all with factor means it can do all operations at given preference
host nevada all 0.5
- "all" keyword one may still override a specific operation/preference
host oregon all, Link 1.6
Host name may also be followed by keyword timerange and a specifier
for the range of times the machine can be considered available
host newyork all, timerange 1900-0700 # outside work hours
This can also be specified in the negative by:
host newyork all, exclude 0700-1900 # not during work hours
Time keywords are timerange, (synonym allow), or exclude
Time range is give as two 24hr time specs with optional ':' as: hh:mm-hh:mm
exclude 06:45-11:30 # early morning period
The time specs are always 24hr but may assume minutes:
6am to 9am -> 6-9 or 600-900 or 6:00-9:00 or 6:00-9 etc
6pm to 9pm -> 18-21 or 1800-2100 or 18:00-21:00 or 18-21:00 etc
6:30am to 6:45pm -> 630-1845 or 6:30-18:45 etc
7:15pm to 6:15am -> 1915-0615 or 19:15-6:15 etc
Predefined range shorthand are:
Always -> 0-2400 (synonym Anytime)
Never -> 0-0
Daytime -> 0800-1700 inclusive
Night -> 1700-0800 inclusive
One may disable use of a machine by any of
allow Never or exclude Always or timerange Never
You may re-define the two time keywords:
Daytime and Night whose default definitions are:
Daytime = 0800-1700
Night = 1700-0800
--- end format ---
feedback welcome,
--
Jerry Pendergraft jerry.pendergraft at endocardial.com
Endocardial Solutions voice: 651-523-6935
1350 Energy Lane, Suite 110 fax: 651-644-7897
St Paul, MN 55108-5254 mobile: 651-491-0163
More information about the Cook-users
mailing list