Issue #4289 has been updated by Rein Henrichs.

Status changed from Ready for Testing to Accepted
Assigned to set to Paul Nasrat

Was marked Ready for Testing but there is no code available.
----------------------------------------
Bug #4289: facter fails to recognize 'OEL' in operatingsystemrelease.rb
http://projects.puppetlabs.com/issues/4289

Author: Jim Bala
Status: Accepted
Priority: Normal
Assigned to: Paul Nasrat
Category: 
Target version: 1.5.8
Affected version: 2.6.0rc4
Keywords: facter
operatingsystemrelease.rb
OEL

Branch: 


This worked fine in 2.6.0rc3.  While I added 'OEL' and 'OVS' in upper-case to 
fix the issue, it was only because I don't know of something somewhere else 
requires oel/ovs to be lowercase.  By adding 'OEL' and 'OVS' as upper-case, the 
problem went away.

Diff:
<pre>    
*** /usr/lib/ruby/site_ruby/1.8/facter/operatingsystemrelease.rb.orig   
2010-07-19 12:34:26.000000000 -0700
--- /usr/lib/ruby/site_ruby/1.8/facter/operatingsystemrelease.rb        
2010-07-19 12:33:25.000000000 -0700
***************
*** 1,5 ****
  Facter.add(:operatingsystemrelease) do
!     confine :operatingsystem => %w{CentOS Fedora oel ovs RedHat}
      setcode do
          case Facter.value(:operatingsystem)
          when "CentOS", "RedHat"
--- 1,5 ----
  Facter.add(:operatingsystemrelease) do
!     confine :operatingsystem => %w{CentOS Fedora oel OEL ovs OVS RedHat}
      setcode do
          case Facter.value(:operatingsystem)
          when "CentOS", "RedHat"
***************
*** 8,15 ****
--- 8,19 ----
              releasefile = "/etc/fedora-release"
          when "oel"
              releasefile = "/etc/enterprise-release"
+         when "OEL"
+             releasefile = "/etc/enterprise-release"
          when "ovs"
              releasefile = "/etc/ovs-release"
+         when "OVS"
+             releasefile = "/etc/ovs-release"
          end
          File::open(releasefile, "r") do |f|
              line = f.readline.chomp
</pre>

Issue:
<pre>
    # facter --debug
    value for netmask_eth1 is still nil
    value for netmask_sit0 is still nil
    value for cfkey is still nil
    Found no suitable resolves of 1 for selinux_policyversion
    value for selinux_policyversion is still nil
    value for ipaddress_eth3 is still nil
    Found no suitable resolves of 2 for iphostnumber
    value for iphostnumber is still nil

>>>    Could not retrieve operatingsystemrelease: can't convert nil into String

    value for network_sit0 is still nil
    value for macaddress_sit0 is still nil
    Found no suitable resolves of 1 for selinux_enforced
    value for selinux_enforced is still nil
    value for netmask_eth2 is still nil
    value for ipaddress_eth1 is still nil
    value for network_eth3 is still nil
    value for ipaddress_sit0 is still nil
    value for network_eth2 is still nil
    value for netmask_eth3 is still nil
    Found no suitable resolves of 1 for uptime
    value for uptime is still nil
    value for ipaddress_eth2 is still nil
    value for network_eth1 is still nil
    Found no suitable resolves of 1 for selinux_mode
    value for selinux_mode is still nil
    architecture => x86_64
    domain => <sanitized>
    facterversion => 1.5.7
    fqdn => <sanitized>
    hardwareisa => x86_64
    hardwaremodel => x86_64
    hostname => <sanitized>
    id => root
    interfaces => eth0,eth1,eth2,eth3,sit0
    ipaddress => <sanitized>
    ipaddress_eth0 => <sanitized>
    is_virtual => false
    kernel => Linux
    kernelmajversion => 2.6
    kernelrelease => 2.6.18-194.3.1.0.2.el5
    kernelversion => 2.6.18
    lsbdistcodename => Carthage
    lsbdistdescription => Enterprise Linux Enterprise Linux Server release 5.5 
(Carthage)
    lsbdistid => EnterpriseEnterpriseServer
    lsbdistrelease => 5.5
    lsbmajdistrelease => 5
    lsbrelease => 
:core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
    macaddress => <sanitized>
    macaddress_eth0 => <sanitized>
    macaddress_eth1 => <sanitized>
    macaddress_eth2 => <sanitized>
    macaddress_eth3 => <sanitized>
    manufacturer => Sun Microsystems
    memoryfree => 15.37 GB
    memorysize => 15.68 GB
    netmask => 255.255.255.0
    netmask_eth0 => 255.255.255.0
    network_eth0 => <sanitized>
    operatingsystem => OEL

>>> operatingsystemrelease => 2.6.18-194.3.1.0.2.el5
>>> Correct answer is '5.5'.

    path => 
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
    physicalprocessorcount => 2
    processor0 => Dual-Core AMD Opteron(tm) Processor 2220
    processor1 => Dual-Core AMD Opteron(tm) Processor 2220
    processor2 => Dual-Core AMD Opteron(tm) Processor 2220
    processor3 => Dual-Core AMD Opteron(tm) Processor 2220
    processorcount => 4
    productname => Sun Fire X4100 M2
    ps => ps -ef
    puppetversion => 2.6.0
    rubysitedir => /usr/lib/ruby/site_ruby/1.8
    rubyversion => 1.8.5
    selinux => false
    serialnumber => <sanitized>                      
    sshdsakey => <sanitized>
    sshrsakey => <sanitized>
    swapfree => 16.00 GB
    swapsize => 16.00 GB
    timezone => PDT
    type => Rack Mount Chassis
    uniqueid => <sanitized>
    uptime_days => 31
    uptime_hours => 766
    uptime_seconds => 2759872
    virtual => physical
</pre>


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