I know it''s not directly related to Puppet but I didn''t find any better place to ask about this either. Since sometimes, there is no value for ''fqdn'' in facter on the puppet agents. [root@disk10 ~]# facter hostname disk10 # [root@disk10 ~]# facter fqdn && date Tue Sep 13 13:26:54 BST 2011 # [root@disk10 ~]# rpm -qa | grep facter facter-1.6.1-0.1.rc2.el5 another thing, which is strange: the certificate request from the agents used to go by the full-name (i.e. fqdn) and now it''s only taking the first-part i.e. the hostname. Does anyone know what am I missing? Cheers!! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ken Barber
2011-Sep-13 13:32 UTC
Re: [Puppet Users] facter not returning ''fqdn'' any more
I''m guessing you get nothing when you try: facter domain ? What version of facter are you running btw? Can you show the results of the following commands: hostname dnsdomainname cat /etc/resolv.conf Cheers. ken. On Tue, Sep 13, 2011 at 1:33 PM, Sans <r.santanu.das@gmail.com> wrote:> I know it''s not directly related to Puppet but I didn''t find any > better place to ask about this either. > > Since sometimes, there is no value for ''fqdn'' in facter on the puppet > agents. > > [root@disk10 ~]# facter hostname > disk10 > # > [root@disk10 ~]# facter fqdn && date > Tue Sep 13 13:26:54 BST 2011 > # > [root@disk10 ~]# rpm -qa | grep facter > facter-1.6.1-0.1.rc2.el5 > > another thing, which is strange: the certificate request from the > agents used to go by the full-name (i.e. fqdn) and now it''s only > taking the first-part i.e. the hostname. Does anyone know what am I > missing? Cheers!! > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig" -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ken Barber
2011-Sep-13 13:34 UTC
Re: [Puppet Users] facter not returning ''fqdn'' any more
> What version of facter are you running btw?You already answered that - never-mind :-). ken. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nope, "facter domain" doesn''t return anything either. [root@disk10 ~]# facter domain && date Tue Sep 13 14:44:21 BST 2011 "hostname", "dnsdomainname" and "resolv.conf" are just fine, like this: [root@disk10 ~]# hostname disk10 [root@disk10 ~]# dnsdomainname hep.xxx.xxx.ac.uk [root@disk10 ~]# cat /etc/resolv.conf ; generated by /sbin/dhclient-script search hep.xxx.xxx.ac.uk nameserver 172.xx.xx.136 nameserver 172.xx.xx.137 Incidentally, my puppet master runs "facter-1.6.0-2.el5" and here "facter fqdn" returns the correct value. Cheers!! On Sep 13, 2:32 pm, Ken Barber <k...@puppetlabs.com> wrote:> I''m guessing you get nothing when you try: > > facter domain > > ? > > What version of facter are you running btw? > > Can you show the results of the following commands: > > hostname > dnsdomainname > cat /etc/resolv.conf > > Cheers. > > ken.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ken Barber
2011-Sep-13 14:29 UTC
Re: [Puppet Users] Re: facter not returning ''fqdn'' any more
Yep - that looks like a bug. The change was here: https://github.com/puppetlabs/facter/commit/f7daae300d5c993052dd6c49b1b5e1f3501eaa10 Basically the domain =~ part is _not_ returning true even though dnsdomainname is returning something, and not falling through as it used to to find the answer from resolv.conf I think. I''m not sure why this logic was changed to not be a fall-through logic - its really a question for the patch author. Can you raise a ticket Sans and post it to this thread? http://projects.puppetlabs.com/projects/facter/issues/new ken. On Tue, Sep 13, 2011 at 2:50 PM, Sans <r.santanu.das@gmail.com> wrote:> Nope, "facter domain" doesn''t return anything either. > > [root@disk10 ~]# facter domain && date > Tue Sep 13 14:44:21 BST 2011 > > "hostname", "dnsdomainname" and "resolv.conf" are just fine, like > this: > > > [root@disk10 ~]# hostname > disk10 > [root@disk10 ~]# dnsdomainname > hep.xxx.xxx.ac.uk > [root@disk10 ~]# cat /etc/resolv.conf > ; generated by /sbin/dhclient-script > search hep.xxx.xxx.ac.uk > nameserver 172.xx.xx.136 > nameserver 172.xx.xx.137 > > Incidentally, my puppet master runs "facter-1.6.0-2.el5" and here > "facter fqdn" returns the correct value. > Cheers!! > > > On Sep 13, 2:32 pm, Ken Barber <k...@puppetlabs.com> wrote: >> I''m guessing you get nothing when you try: >> >> facter domain >> >> ? >> >> What version of facter are you running btw? >> >> Can you show the results of the following commands: >> >> hostname >> dnsdomainname >> cat /etc/resolv.conf >> >> Cheers. >> >> ken. > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig" -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ken Barber
2011-Sep-13 14:36 UTC
Re: [Puppet Users] Re: facter not returning ''fqdn'' any more
I could be wrong about the cause actually ... I think its still a bug though :-). Let me take a closer look at the code and see if I can work it out. ken. On Tue, Sep 13, 2011 at 3:29 PM, Ken Barber <ken@puppetlabs.com> wrote:> Yep - that looks like a bug. The change was here: > > https://github.com/puppetlabs/facter/commit/f7daae300d5c993052dd6c49b1b5e1f3501eaa10 > > Basically the domain =~ part is _not_ returning true even though > dnsdomainname is returning something, and not falling through as it > used to to find the answer from resolv.conf I think. I''m not sure why > this logic was changed to not be a fall-through logic - its really a > question for the patch author. > > Can you raise a ticket Sans and post it to this thread? > > http://projects.puppetlabs.com/projects/facter/issues/new > > ken. > > On Tue, Sep 13, 2011 at 2:50 PM, Sans <r.santanu.das@gmail.com> wrote: >> Nope, "facter domain" doesn''t return anything either. >> >> [root@disk10 ~]# facter domain && date >> Tue Sep 13 14:44:21 BST 2011 >> >> "hostname", "dnsdomainname" and "resolv.conf" are just fine, like >> this: >> >> >> [root@disk10 ~]# hostname >> disk10 >> [root@disk10 ~]# dnsdomainname >> hep.xxx.xxx.ac.uk >> [root@disk10 ~]# cat /etc/resolv.conf >> ; generated by /sbin/dhclient-script >> search hep.xxx.xxx.ac.uk >> nameserver 172.xx.xx.136 >> nameserver 172.xx.xx.137 >> >> Incidentally, my puppet master runs "facter-1.6.0-2.el5" and here >> "facter fqdn" returns the correct value. >> Cheers!! >> >> >> On Sep 13, 2:32 pm, Ken Barber <k...@puppetlabs.com> wrote: >>> I''m guessing you get nothing when you try: >>> >>> facter domain >>> >>> ? >>> >>> What version of facter are you running btw? >>> >>> Can you show the results of the following commands: >>> >>> hostname >>> dnsdomainname >>> cat /etc/resolv.conf >>> >>> Cheers. >>> >>> ken. >> >> -- >> You received this message because you are subscribed to the Google Groups "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >> >> > > > > -- > "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: > http://bit.ly/puppetconfsig" >-- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig" -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ken Barber
2011-Sep-13 14:43 UTC
Re: [Puppet Users] Re: facter not returning ''fqdn'' any more
Yeah okay I was close though :-).
if name = Facter::Util::Resolution.exec(''hostname'')
...
elsif domain =
Facter::Util::Resolution.exec(''dnsdomainname'')
The first bit will pretty much always be true ... and if your
''hostname'' command doesn''t contain your full domain -
it won''t fall
back to checking dnsdomainnname or resolv.conf.
ken.
On Tue, Sep 13, 2011 at 3:36 PM, Ken Barber <ken@puppetlabs.com>
wrote:> I could be wrong about the cause actually ... I think its still a bug
> though :-).
>
> Let me take a closer look at the code and see if I can work it out.
>
> ken.
>
> On Tue, Sep 13, 2011 at 3:29 PM, Ken Barber <ken@puppetlabs.com>
wrote:
>> Yep - that looks like a bug. The change was here:
>>
>>
https://github.com/puppetlabs/facter/commit/f7daae300d5c993052dd6c49b1b5e1f3501eaa10
>>
>> Basically the domain =~ part is _not_ returning true even though
>> dnsdomainname is returning something, and not falling through as it
>> used to to find the answer from resolv.conf I think. I''m not
sure why
>> this logic was changed to not be a fall-through logic - its really a
>> question for the patch author.
>>
>> Can you raise a ticket Sans and post it to this thread?
>>
>> http://projects.puppetlabs.com/projects/facter/issues/new
>>
>> ken.
>>
>> On Tue, Sep 13, 2011 at 2:50 PM, Sans <r.santanu.das@gmail.com>
wrote:
>>> Nope, "facter domain" doesn''t return anything
either.
>>>
>>> [root@disk10 ~]# facter domain && date
>>> Tue Sep 13 14:44:21 BST 2011
>>>
>>> "hostname", "dnsdomainname" and
"resolv.conf" are just fine, like
>>> this:
>>>
>>>
>>> [root@disk10 ~]# hostname
>>> disk10
>>> [root@disk10 ~]# dnsdomainname
>>> hep.xxx.xxx.ac.uk
>>> [root@disk10 ~]# cat /etc/resolv.conf
>>> ; generated by /sbin/dhclient-script
>>> search hep.xxx.xxx.ac.uk
>>> nameserver 172.xx.xx.136
>>> nameserver 172.xx.xx.137
>>>
>>> Incidentally, my puppet master runs "facter-1.6.0-2.el5"
and here
>>> "facter fqdn" returns the correct value.
>>> Cheers!!
>>>
>>>
>>> On Sep 13, 2:32 pm, Ken Barber <k...@puppetlabs.com> wrote:
>>>> I''m guessing you get nothing when you try:
>>>>
>>>> facter domain
>>>>
>>>> ?
>>>>
>>>> What version of facter are you running btw?
>>>>
>>>> Can you show the results of the following commands:
>>>>
>>>> hostname
>>>> dnsdomainname
>>>> cat /etc/resolv.conf
>>>>
>>>> Cheers.
>>>>
>>>> ken.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
Groups "Puppet Users" group.
>>> To post to this group, send email to puppet-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
>>> For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
>>>
>>>
>>
>>
>>
>> --
>> "Join us for PuppetConf, September 22nd and 23rd in Portland, OR:
>> http://bit.ly/puppetconfsig"
>>
>
>
>
> --
> "Join us for PuppetConf, September 22nd and 23rd in Portland, OR:
> http://bit.ly/puppetconfsig"
>
--
"Join us for PuppetConf, September 22nd and 23rd in Portland, OR:
http://bit.ly/puppetconfsig"
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Ken Barber
2011-Sep-13 16:38 UTC
Re: [Puppet Users] Re: facter not returning ''fqdn'' any more
Since this is urgent and we are in RC, I''ve raised a bug for you Sans: http://projects.puppetlabs.com/issues/9457 ken. On Tue, Sep 13, 2011 at 3:43 PM, Ken Barber <ken@puppetlabs.com> wrote:> Yeah okay I was close though :-). > > if name = Facter::Util::Resolution.exec(''hostname'') > ... > elsif domain = Facter::Util::Resolution.exec(''dnsdomainname'') > > The first bit will pretty much always be true ... and if your > ''hostname'' command doesn''t contain your full domain - it won''t fall > back to checking dnsdomainnname or resolv.conf. > > ken. > > On Tue, Sep 13, 2011 at 3:36 PM, Ken Barber <ken@puppetlabs.com> wrote: >> I could be wrong about the cause actually ... I think its still a bug >> though :-). >> >> Let me take a closer look at the code and see if I can work it out. >> >> ken. >> >> On Tue, Sep 13, 2011 at 3:29 PM, Ken Barber <ken@puppetlabs.com> wrote: >>> Yep - that looks like a bug. The change was here: >>> >>> https://github.com/puppetlabs/facter/commit/f7daae300d5c993052dd6c49b1b5e1f3501eaa10 >>> >>> Basically the domain =~ part is _not_ returning true even though >>> dnsdomainname is returning something, and not falling through as it >>> used to to find the answer from resolv.conf I think. I''m not sure why >>> this logic was changed to not be a fall-through logic - its really a >>> question for the patch author. >>> >>> Can you raise a ticket Sans and post it to this thread? >>> >>> http://projects.puppetlabs.com/projects/facter/issues/new >>> >>> ken. >>> >>> On Tue, Sep 13, 2011 at 2:50 PM, Sans <r.santanu.das@gmail.com> wrote: >>>> Nope, "facter domain" doesn''t return anything either. >>>> >>>> [root@disk10 ~]# facter domain && date >>>> Tue Sep 13 14:44:21 BST 2011 >>>> >>>> "hostname", "dnsdomainname" and "resolv.conf" are just fine, like >>>> this: >>>> >>>> >>>> [root@disk10 ~]# hostname >>>> disk10 >>>> [root@disk10 ~]# dnsdomainname >>>> hep.xxx.xxx.ac.uk >>>> [root@disk10 ~]# cat /etc/resolv.conf >>>> ; generated by /sbin/dhclient-script >>>> search hep.xxx.xxx.ac.uk >>>> nameserver 172.xx.xx.136 >>>> nameserver 172.xx.xx.137 >>>> >>>> Incidentally, my puppet master runs "facter-1.6.0-2.el5" and here >>>> "facter fqdn" returns the correct value. >>>> Cheers!! >>>> >>>> >>>> On Sep 13, 2:32 pm, Ken Barber <k...@puppetlabs.com> wrote: >>>>> I''m guessing you get nothing when you try: >>>>> >>>>> facter domain >>>>> >>>>> ? >>>>> >>>>> What version of facter are you running btw? >>>>> >>>>> Can you show the results of the following commands: >>>>> >>>>> hostname >>>>> dnsdomainname >>>>> cat /etc/resolv.conf >>>>> >>>>> Cheers. >>>>> >>>>> ken. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups "Puppet Users" group. >>>> To post to this group, send email to puppet-users@googlegroups.com. >>>> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. >>>> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >>>> >>>> >>> >>> >>> >>> -- >>> "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: >>> http://bit.ly/puppetconfsig" >>> >> >> >> >> -- >> "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: >> http://bit.ly/puppetconfsig" >> > > > > -- > "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: > http://bit.ly/puppetconfsig" >-- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig" -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Thanks Ken! Back home an hr. or so ago and saw you reply. Is it the "/usr/lib/ruby/ site_ruby/1.8/facter/domain.rb" file that you were talking about? Cheers, San On Sep 13, 5:38 pm, Ken Barber <k...@puppetlabs.com> wrote:> Since this is urgent and we are in RC, I''ve raised a bug for you Sans: > > http://projects.puppetlabs.com/issues/9457 > > ken.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ken Barber
2011-Sep-13 20:25 UTC
Re: [Puppet Users] Re: facter not returning ''fqdn'' any more
Yeah - try this copy instead if you can: https://raw.github.com/puppetlabs/facter/master/lib/facter/domain.rb ken. On Tue, Sep 13, 2011 at 9:21 PM, Sans <r.santanu.das@gmail.com> wrote:> Thanks Ken! > Back home an hr. or so ago and saw you reply. Is it the "/usr/lib/ruby/ > site_ruby/1.8/facter/domain.rb" file that you were talking about? > > Cheers, > San > > On Sep 13, 5:38 pm, Ken Barber <k...@puppetlabs.com> wrote: >> Since this is urgent and we are in RC, I''ve raised a bug for you Sans: >> >> http://projects.puppetlabs.com/issues/9457 >> >> ken. > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig" -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Done!! Work like a charm. thanks. -Santanu On Sep 13, 9:25 pm, Ken Barber <k...@puppetlabs.com> wrote:> Yeah - try this copy instead if you can: > > https://raw.github.com/puppetlabs/facter/master/lib/facter/domain.rb > > ken.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ken Barber
2011-Sep-13 22:09 UTC
Re: [Puppet Users] Re: facter not returning ''fqdn'' any more
Good to hear. That fix should be in the next rc. ken. On Tue, Sep 13, 2011 at 10:46 PM, Sans <r.santanu.das@gmail.com> wrote:> Done!! > Work like a charm. thanks. > > -Santanu > > > On Sep 13, 9:25 pm, Ken Barber <k...@puppetlabs.com> wrote: >> Yeah - try this copy instead if you can: >> >> https://raw.github.com/puppetlabs/facter/master/lib/facter/domain.rb >> >> ken. > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig" -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.