bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Aliased names.


From: Ronan KERYELL
Subject: Re: Aliased names.
Date: 30 Apr 2001 10:50:39 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> On Tue, 17 Apr 2001 17:47:05 +0200, "GERMA Denis" <address@hidden> said:

    GERMA> Hi, You seem to be using gethostbyname in Version 1.6.3 to try
    GERMA> to get the aliases in the GetNameInfo function which declare
    GERMA> the classes for hostname, system, .....

    GERMA> I tested the gethostbyname (on Linux), and I confirme that the
    GERMA> h_aliases only contains Info when you call the gethostbyname
    GERMA> with an aliased name. (The one we are looking for).

    GERMA> h_named then contains the canonical name and h_aliases contains
    GERMA> the alias fully qualified name.

    GERMA> The solutions to add the aliased names in class, seems to be
    GERMA> either call the gethostbyname (and or a cache) each time there
    GERMA> is a miss in the class search (Ronan KERYELL proposal), or try
    GERMA> to list the domain.

No, you cannot list the domain because it is no longer encapsulated (in an
object oriented point of view) : gethostbyname in the entry point into
whatever nsswitch.conf say you to use (LDAP, NIS+, DNS, FNS,...).

    GERMA> The solution may then be (I did not yet traducted in C.) :

    GERMA> echo 'lserver autoritative_dns_server ls -a domain_name' |
    GERMA> nslookup | grep hostname

    GERMA> This in fact produce the CNAME table.  and then grep the
    GERMA> hostname in it.

    GERMA> Draw backs are then : It does not seems to work on non
    GERMA> autoritative dns server (Not a general method). (Consider Ronan
    GERMA> KERYELL explanation) It implicitely list all machines (network
    GERMA> traffic) It may be difficult to get the name for the
    GERMA> autoritative DNS server in a complex DNS hierarchie.  The
    GERMA> autoritative DNS server may forbid listing the domain.

DNS servers seem to forbid more and more zone transfers to the open world
for security and performance reasons...

Furthermore, typically for WWW, I have a machine that is in almost 100
different domains...

And what if you do not use the DNS framework ?

    GERMA> For the Ronan KERYELL proposal, draw backs may be : It does not
    GERMA> fit with the actual architecture.  A DNS query is issued each
    GERMA> time a miss is issued and has not allready been seen.

No, not specially a DNS query. It depends on gethostbyname and you already
have this kind of caching in the OS (for example, have a look at nscd on
Solaris).

    GERMA>   A cache containing "class miss" may have to be maintained and
    GERMA> is memory consuming.

Well, the aim of cfengine is to throw away some hardware resources instead
of administrator's neurons... :-)

In a typical configuration it will spoil a few kB.

Has anyone a better proposal ?
-- 
    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 BREST CEDEX          |\   E-mail: address@hidden
    FRANCE                     | \  http://www-info.enst-bretagne.fr/~keryell



reply via email to

[Prev in Thread] Current Thread [Next in Thread]