FAI trouble (2)

Ronan.Keryell at enst-bretagne.fr Ronan.Keryell at enst-bretagne.fr
Tue Sep 2 16:18:21 CEST 2003


>>>>> On Wed, 23 Jul 2003 11:21:00 +0200, Thomas Lange <lange at informatik.Uni-Koeln.DE> said:

    >> In fai-class : HOSTNAME=`uname -n | cut -d. -f1`; export HOSTNAME

    >> What's that ? :-( I guess it is up to the local administrator to
    >> decide she will use or not FQDN, not up to the FAI...
    Thomas> Mmmmmh. I'm not sure. Since the hostname is also a class name
    Thomas> and class names should not contain any dots I think fai should
    Thomas> use only the short name for the classes. You will have some
    Thomas> problems when using cfengine scripts.

    Thomas>  There a dot inside a list of classes means a logical AND of
    Thomas> these classes. I also think most people will use the short
    Thomas> name.

Well, for cfengine it is a behaviour we may accept, with for example
informatik.Uni-Koeln.DE changed in the definition of informatik, Uni-Koeln
and DE class definitions or modify cfclasses=${cfclasses// /.} in
subroutines to change first all the . in _ as the classical cfengine
class definition behaviour.

But it is not the real issue.

    >> I have a complex infrastructure name and I need to use sub-domain
    >> name to avoid simple name conflicts...
    Thomas> What about defining a new class (see below) and not using any
    Thomas> file that has the FQDN?

    Thomas> uname -n | tr . _ | tr /a-z/ /A-Z/

Yes of course.

I guess it could be a good point to offer BOTH class names, short an full
one, as automatically done in cfengine, to make everybody happy :-)

But what I can not cope with is that the HOSTNAME variable is
*OVERRIDDEN*, exported but used by many other class scripts afterwards so
that we can no longer get later the FQDN... :-( Why not adding
informatik.Uni-Koeln.DE to the host name value hardcoded in FAI? :-)

Using FAI and using short or FQDN should be orthogonal choices...

Is there any hook to avoid HOSTNAME thrashing except by modifying FAI
sources?

IMHO, HOSTNAME should not be changed and remained unchanged from
file/DHCP/BOOTP/whatever but fai-class should define a class name which
name is the short host name.

Defining a SHORT_HOSTNAME exported variable in fai-class without modifying
HOSTNAME? It is then to the administrator to use the variable she wants.

It is necessary to deal with big installations with big naming spaces
without conflicts or cross-installations where the installed machine
network is not the same as the network during the installation and so on
without having to call sethostname()/uname -n/...
-- 
  Ronan KERYELL               |\/  Tel:    (+33|0) 2.29.00.14.15
  Labo Informatique & Télécom |/)  Fax:    (+33|0) 2.29.00.12.82
  ENST Bretagne, CS 83818     K    GSM:    (+33|0) 6.13.14.37.66
  F-29238 PLOUZANÉ CEDEX      |\   E-mail: rk at enstb.org
  FRANCE                      | \  http://www.lit.enstb.org/~keryell




More information about the linux-fai mailing list