Issue #9766 has been updated by Ken Barber.

Subject changed from hostname fact is incorrect to hostname fact doesn't handle 
hostnames with dots (relative to domainname)
Affected Facter version changed from 1.5.8 to 1.6.1rc4

Doug Balmer wrote:
> Some of us for various reasons like to have "hostname"s that are "relative 
> names" that could contain a period. "example.com" below is the domain name.

So the premise here is that 'hostname' is really the relative name once the 
domainname is removed from fqdn. In some ways I concur as I have used 
multi-part 'hostnames' before like this but I think its very subjective and 
needs debate.

On the negative another way to look at this is that really a hostname could be 
relative to varying parts of a domain. So lets say you have:

    foo1.production.city.country.mydomain.com

Out of the following what would the hostname be?

    foo1
    foo1.production
    foo1.production.city
    foo1.production.city.country

(and in-turn what is the domainname?)

I think the important question Doug is really what you want to do with this 
information that you can't do without breaking down the $fqdn using functions 
like split etc. Or with say regexp matching for node definitions or using the 
$fqdn fact. What is the real world use case that makes this important to you?
----------------------------------------
Bug #9766: hostname fact doesn't handle hostnames with dots (relative to 
domainname)
https://projects.puppetlabs.com/issues/9766

Author: Doug Balmer
Status: Needs Decision
Priority: Normal
Assignee: Ken Barber
Category: 
Target version: 
Keywords: 
Branch: 
Affected Facter version: 1.6.1rc4


Some of us for various reasons like to have "hostname"s that are "relative 
names" that could contain a period. "example.com" below is the domain name.

    [email protected]:/usr/lib/ruby/site_ruby/1.8/facter # rpm -qa| grep puppet
    puppet-2.6.6-1.el5
    [email protected]:/usr/lib/ruby/site_ruby/1.8/facter # rpm -qa| grep facter
    facter-1.5.8-1
    [email protected]:/usr/lib/ruby/site_ruby/1.8/facter # hostname
    pdms01.lpr
    [email protected]:/usr/lib/ruby/site_ruby/1.8/facter # hostname -f
    pdms01.lpr.example.com
    [email protected]:/usr/lib/ruby/site_ruby/1.8/facter # uname -n
    pdms01.lpr
    [email protected]:/usr/lib/ruby/site_ruby/1.8/facter # sysctl kernel.hostname
    kernel.hostname = pdms01.lpr
    [email protected]:/usr/lib/ruby/site_ruby/1.8/facter # facter hostname
    pdms01
    


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to