Testing changes in FAI
Thomas Lange
lange at informatik.Uni-Koeln.DE
Wed Sep 20 09:46:35 CEST 2006
>>>>> On Tue, 19 Sep 2006 22:34:26 -0400, Paul Lussier <p.lussier at comcast.net> said:
> Is there currently a way to answering the question "What would FAI
> do?" for a given host *other* than actually FAI'ing that host?
Short answer: No and Yes.
Long version:
Not completely. You scripts in class/ for defining classes may also
depend on the hardware found, so the list of classes does not only
depend on the hostname. But if you are sure that the hostname is the
most important information to define classes this can be done.
> - which classes a given host is in
we can set HOSTNAME and then call fai-class, which gives us all the
classes.
> - which disk config would be used
you can call setup_harddisks with the option -X which does only a
test, no real formating is done and you see what setup_harddisks would
have done.
> - what packages would be installed (and what dependencies would get
> dragged in)
Use install_packages -l for that.
-l Print only the list of all packages that would be installed, then exit.
If you liketo know all packags that will be installed because of
dependencies, I have to enhance the script a little bit, but it's
possible using the -s or --dry-run option of apt-get.
> - which scripts would run and what the output/results of those
> scripts would be
fai-do-script has the option -n. But it will be impossible to get the
output of those script without really executing them. cfagent also has
a --dry-run flag, but IMO it's impossible for shell or perl scripts.
> - what files would be installed (via fcopy)
use -n.
> Sort of a lint for FAI type of thing.
IMO this is less than a lint thing, because you will not detect syntax
errors in your scripts.
I had the same idea as Michael who suggest a new action like test. IMO
this would be the best way to implement such a functionality.
--
regards Thomas
More information about the linux-fai
mailing list