Issue #1860 has been reported by twpayne.

----------------------------------------
Bug #1860: facter operatingsystemrelease raises a fatal exception on OpenSolaris
http://projects.reductivelabs.com/issues/show/1860

Author: twpayne
Status: Unreviewed
Priority: High
Assigned to: 
Category: 
Target version: 
Complexity: Easy
Keywords: 


On OpenSolaris running facter 1.5.2 (downloaded from tarball) raises a fatal 
exception.  This makes facter (and therefore puppet) unusable on OpenSolaris, 
hence the priority "High".

<pre>
# cat /etc/release
                       OpenSolaris 2008.11 snv_101b_rc2 X86
           Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 19 November 2008

# uname -a
SunOS isdc3201 5.11 snv_101b i86pc i386 i86pc Solaris

# bin/facter --version
1.5.2

# bin/facter
/export/home/twp/src/facter-1.5.2/lib/facter/operatingsystemrelease.rb:79: 
private method `chomp' called for nil:NilClass (NoMethodError)
        from 
/export/home/twp/src/facter-1.5.2/lib/facter/util/resolution.rb:117:in `call'
        from 
/export/home/twp/src/facter-1.5.2/lib/facter/util/resolution.rb:117:in `value'
        from /opt/csw/lib/ruby/1.8/timeout.rb:53:in `timeout'
        from 
/export/home/twp/src/facter-1.5.2/lib/facter/util/resolution.rb:115:in `value'
        from /export/home/twp/src/facter-1.5.2/lib/facter/util/fact.rb:75:in 
`value'
        from /opt/csw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
`inject'
        from /export/home/twp/src/facter-1.5.2/lib/facter/util/fact.rb:71:in 
`each'
        from /export/home/twp/src/facter-1.5.2/lib/facter/util/fact.rb:71:in 
`inject'
        from /export/home/twp/src/facter-1.5.2/lib/facter/util/fact.rb:71:in 
`value'
        from /export/home/twp/src/facter-1.5.2/lib/facter/util/fact.rb:117:in 
`searching'
        from /export/home/twp/src/facter-1.5.2/lib/facter/util/fact.rb:67:in 
`value'
        from 
/export/home/twp/src/facter-1.5.2/lib/facter/util/collection.rb:104:in `to_hash'
        from /export/home/twp/src/facter-1.5.2/lib/facter/util/loader.rb:72:in 
`inject'
        from 
/export/home/twp/src/facter-1.5.2/lib/facter/util/collection.rb:103:in `each'
        from 
/export/home/twp/src/facter-1.5.2/lib/facter/util/collection.rb:103:in `inject'
        from 
/export/home/twp/src/facter-1.5.2/lib/facter/util/collection.rb:103:in `to_hash'
        from /export/home/twp/src/facter-1.5.2/lib/facter.rb:92:in `send'
        from /export/home/twp/src/facter-1.5.2/lib/facter.rb:92:in `to_hash'
        from bin/facter:121
</pre>
The problem is line is:
<pre>full_release = File.readlines("/etc/release").to_s.match(/Solaris \w+ 
[\w\/]+ ([^_]+_[^_]+)/).to_a.last.chomp("wos")</pre>@/etc/release@ has a 
slightly different format on OpenSolaris, see the attached examples, so the 
regular expression does not match and returns @n...@. The long chain of method 
calls means that this match failure is not caught.


----------------------------------------
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://reductivelabs.com/redmine/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