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: 12 Apr 2001 18:19:30 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> On Thu, 12 Apr 2001 16:33:35 +0200 (MET DST), address@hidden said:

    >>  It sounds to me that what we are interested in is a map "name or
    >> IP -> aliases" but the DNS CNAME tables are "aliases -> name" map.
    >> 
    >> The only way I can figure out is to test the DNS for every new
    >> cfengine class is met to see if we can find out one of our IP
    >> adresses again.
    >> 
    >> That would also solve the multiple name -> same IP case by the
    >> way...
    >> 

    Mark> It is supposedly possible to extract all names and aliases for
    Mark> an IP address from the C structures, but when I tried it did not
    Mark> work as expected.

Sure, if they are in the C structures...

I've not been clear enough :

DNS CNAME, A or MX RR represent a mathematical function "name -> real name
or IP"

DNS PTR represent a mathematical function "IP -> name"

It is what you get in the C structures, but *for a given* left element.

But when cfengine is lauched, as for any command, you know the IP adresses of 
the machine and
also the hostname or nodename. Unfortunately you cannot know all the names
that would target the same IPs because you cannot invert the DNS CNAME or
A function and because the DNS PTR database give you only the main
name... :-(

So, what I propose is a lazy solution with a cache system : every time you
encounter a new class, just do a DNS CNAME + A with recursion enabled to
test whether it is an other name for the machine. If yes, put the class as
true in the cache. Well, I guess that during the cfengine run the DNS
table will not change... :-)

It is the reason of the sendmail.cw file for example that states all the
names the names sendmail is responsible for because she cannot figure it out...

-- 
    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]