Issue #5013 has been updated by James Turnbull. Category set to interface Status changed from Unreviewed to Needs design decision Assignee set to Paul Nasrat
---------------------------------------- Bug #5013: Facter assumes path that isn't there always https://projects.puppetlabs.com/issues/5013 Author: Michael Stahnke Status: Needs design decision Priority: Normal Assignee: Paul Nasrat Category: interface Target version: Keywords: Branch: Related Bugs: 1901, 1745 and commit: Revision 051c8437 Facter when running in stand-alone mode, (not in the context of puppet) seems to rely on the user environment variables to resolve facts, specifically when running Facter::Util::Resolution.exec (see virtual.rb for an example, but not the only one). Here is a simple test case. I knew in this case that this was on VMware. /sbin/lspci | grep -i vmware |wc -l cat /etc/redhat-release facter --version export PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin facter virtual export PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin facter virtual Output from this test case: [r...@sbox01 ~]# /sbin/lspci | grep -i vmware |wc -l #just to show it is indeed vmware 35 [r...@sbox01 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.5 (Tikanga) [r...@sbox01 ~]# facter --version 1.5.8 [r...@sbox01 ~]# export PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin [r...@sbox01 ~]# facter virtual **vmware** [r...@sbox01 ~]# export PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin [r...@sbox01 ~]# facter virtual **physical** This is problematic, as some of my privileged users run facter in scripts, however the facts do not resolve correctly if they don't have /sbin and/or /usr/sbin in their PATH. I would have submitted a patch, but this seems to be more of a design decision than a code fix, especially after seeing already closed issues related to this topic. I see this as a bug, and a fairly easy to fix, but serious bug. -- 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.
