Issue #13024 has been updated by Stefan Schulte.
I am not sure if a timeout is the right thing. The timeout in `virtual.rb` is constantly bugging me on slow/busy machines and I am just happy that I do not rely on that fact (because the puppetrun continues with a wrong set of facts) So what I would like to see is: - Only set a timeout if we are be sure that, the inital bug applies on that machine (unfortunately I am not able to access the old bug report so I do not know if that is possible). - Fail hard in case we raise a timeout. If people have conditionals around `productname` an we just return nil as a factvalue, the puppetrun can lead to all kinds of funny results. ---------------------------------------- Bug #13024: Solaris prtdiag hangs Facter when determining manufacturer and productname https://projects.puppetlabs.com/issues/13024#change-91619 * 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
