Issue #13024 has been updated by Jeff Weiss.

Target version deleted (1.6.x)


----------------------------------------
Bug #13024: Solaris prtdiag hangs Facter when determining manufacturer and 
productname
https://projects.puppetlabs.com/issues/13024#change-63714

Author: Dave Taylor
Status: Accepted
Priority: Normal
Assignee: 
Category: 
Target version: 
Keywords: Solaris, manufacturer, productname, prtdiag
Branch: 
Affected Facter version: 1.6.4


Issue #2714 altered the call to prtdiag in virtual.rb to have a timeout, as 
prtdiag itself can hang indefinitely. There is another use of prtdiag in 
util/manufacturer.rb to determine manufacturer and productname (see issue 
#5325). This latter use of prtdiag does not have a timeout set, so the same fix 
from issue #2714 needs to be applied.


    diff -Naur facter_164/util/manufacturer.rb facter/util/manufacturer.rb
    --- facter_164/util/manufacturer.rb     2011-12-14 16:38:07.000000000 +0000
    +++ facter/util/manufacturer.rb 2012-03-08 10:27:41.257785232 +0000
    @@ -63,7 +63,11 @@
    def self.prtdiag_sparc_find_system_info()
        # Parses prtdiag for a SPARC architecture string, won't work with 
Solaris x86
    -    output = Facter::Util::Resolution.exec('/usr/sbin/prtdiag 2>/dev/null')
    +    #output = Facter::Util::Resolution.exec('/usr/sbin/prtdiag 
2>/dev/null')
    +    res = Facter::Util::Resolution.new('prtdiag')
    +    res.timeout = 6
    +    res.setcode('prtdiag')
    +    output = res.value
        # System Configuration:  Sun Microsystems  sun4u Sun SPARC Enterprise 
M3000 Server
        if output and output =~ /^System 
Configuration:\s+(.+?)\s+(sun\d+\S+)\s+(.+)/
    


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