Issue #7670 has been updated by Ken Bowley.

I'm using Puppet 2.6.8, but the bug is definitely in Facter, and it is a long 
standing bug.  The problem is that the check for Ubuntu is relying on 
'lsbdistid' which is cleared out during the Facter.clear.  The current method 
is close, in that you need to look in the /etc/lsb-release file, but you cannot 
rely on the 'lsbdistid' fact being loaded before the 'operatingsytem' fact.  
The other long standing bug is the check for 'operatingsystemrelease' which 
looks in the /etc/issue file, which is commonly overwritten in large 
environments with site specific information.

The Facter 1.5.8, if you perform a Facter.loadfacts after the Facter.clear, the 
lsb information is picked up before the operatingsystem fact.  In 1.5.9, the 
operatingsystem fact appears to be determined before the lsb information.  One 
way to get the correct information is to do a Facter.flush after the 
Facter.loadfacts, but at that point you are just working around the issue by 
covering your eyes and yelling "la la la la la..."
----------------------------------------
Bug #7670: operatingsystem fact incorrect after clear on Ubuntu
https://projects.puppetlabs.com/issues/7670

Author: Ken Bowley
Status: Accepted
Priority: Immediate
Assignee: 
Category: library
Target version: 
Keywords: 
Branch: 
Affected Facter version: 1.5.9


Facter returns incorrect facts for "operatingsystem" and 
"operatingsystemrelease" after Facter.clear is called when running on Ubuntu.

    $ irb
    irb(main):001:0> require 'rubygems'
    => true
    irb(main):002:0> require 'facter'
    => true
    irb(main):003:0> Facter["operatingsystem"].value
    => "Ubuntu"
    irb(main):004:0> Facter.clear
    => nil
    irb(main):005:0> Facter["operatingsystem"].value
    => "Debian"

This causes puppet to report the wrong operatingsystem, and breaks many 
manifests on our current deployment.


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