>From your reply I'm not really sure anything needs to be changed, so I'll
try to summarise how the domain/fqdn and hostname facts are determined.

1st step, fetch value for hostname, this is done by calling Socket
gethostbyname method (previously was simply the output of `hostname`).

if hostname is a fqdn, fill up the fqdn fact, domain and name accordingly.

if hostname is short, for the domain fact - execute and use the first answer
from:
dnsdomainname
domain statement in resolv.conf
search statement in resolv.conf

then use name + domain facts to build up the fqdn.

I don't think we need to query dns service to get our own dns entry, this
means our machine setup is broken to begin with.

Ohad


On Thu, Jan 28, 2010 at 7:40 PM, martin <[email protected]> wrote:

>
>
> On Jan 28, 10:35 am, Ohad Levy <[email protected]> wrote:
>
> > > I'd like to see a solution that takes in to account all different
> > > configs:
> > > - nodename set to hostname
> >
> > >  - pick up domain from DNS
> >
> > do you really want to query dns to find the the host domain name?
> >
> I don't but I've seen some people using:
> /etc/nodename: foo
> /etc/hosts: 72.5.124.61 foo
> /etc/resolv.conf: domain bar.com
>
> so the only way to get the domain is to do a DNS lookup.
>
> >  - pick up domain from LDAP
> >  - pick up domain from NIS
> >
> > I would think that would be a completely different fact  - what I wanted
> to
> > do in this patch is to say - domainname is DNS, if you want nis or ldap,
> use
> > another fact.
> >
> Yes, they should probably end up in ldapdomain & nisdomain.
>
> > > - nodename set to hostname and fqdn
> >
> > nodename as /etc/nodename? isnt it part of the system configuration
> (rather
> > then querying it?)
> > The output of (hostname) or the ruby Socket call, return the hostname or
> > fqdn (if its defined as fqdn).
> >
> Yes, but we're using "uname -n"/"hostname" to determine it.
>
> > what I've done is that if the hostname is fqdn, then the hostname is the
> > shortname, and that would also set the fqdn fact - before it used to
> create
> > the fqdn fact from hostname + domain.
> >
> We usually set:
> /etc/nodename: foo
> /etc/hosts: 72.5.124.61 foo foo.bar.com
>
> cheers,
> /Martin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<puppet-dev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to