Future of FAI (fwd)

Ronan KERYELL Ronan.Keryell at enst-bretagne.fr
Mon Dec 2 15:54:19 CET 2002


>>>>> On Thu, 28 Nov 2002 17:22:02 +0100, Thomas Lange <lange at informatik.uni-koeln.de> said:

>>>>> On Wed, 27 Nov 2002 14:55:49 -0800, "Bruce  Edge" <bedge at troikanetworks.com> said:
    >> Files in class/ are processed by name, so are the
    >> script/CLASSNAME/* scripts.  I think script/* ought to follow the
    >> same rules.
    Thomas> Scripts in class/ must be processed by name, because no
    Thomas> classes are defined at this stage. After all classes are
    Thomas> defined, the order of classes matters. This is important for
    Thomas> ftar and fcopy. Maybe it's not that important for the
    Thomas> scripts. I will think about it.

In fact I have already this issue in my everyday cfengine scripts and also
in FAI scripts, where I need to implement a fix point.

Right now some FAI scripts relaunch former FAI scripts on some conditions
up to get the good global behaviour. It is very usefull when bootstrapping
complex stuff such as automatically installing Debian mirror, FAI server,
etc.

A simple solution I think to implement in my PCFengine (my Python version
of Cfengine,
http://www.lit.enstb.org/~keryell/projets/PCFengine/expose/2002-09-12/) is
to use a returned boolean by any action to know if we need a new round.

A simple algorithm for FAI (if we guess all the script return an OK
status) could be :

while true
    status = TRUE
    for s in scripts
        status &= s()
    if status == TRUE
        break

It is trivial but could be enough for a system installation, without need
for complex topological sorts and other dependance graph stuff.

Most of scripts would return OK, and skip execution if the script has
already been executed.

A FAI script function would help implementing this default behaviour.
-- 
    Ronan KERYELL              |\/
    Labo Informatique Télécom  |/)  Tel:    (+33|0) 2.29.00.14.15
    ENST Bretagne, BP832       K    Fax:    (+33|0) 2.29.00.12.82
    29285 PLOUZANE CEDEX       |\   E-mail: Ronan.Keryell at enst-bretagne.fr
    FRANCE                     | \  http://www.lit.enstb.org/~keryell



More information about the linux-fai mailing list