Issue #16081 has been updated by Robert Welgan.

I did some testing on my AIX machine and I realized my thinking was wrong:  I 
needed to change the logic in the architecture.rb file:

thewell:facter rwelgan$ diff architecture.rb architecture.rb.orig
7,8c7
< #   On non-AIX IBM, OpenBSD, Linux and Debian's kfreebsd, use the 
hardwaremodel fact.
< #   On AIX get the type value from lsattr -El proc0
---
> #   On AIX, OpenBSD, Linux and Debian's kfreebsd, use the hardwaremodel fact.
20,29d18
<     when /IBM*/
<       case Facter.value(:operatingsystem)
<       when "AIX"
<          arch = Facter::Util::Resolution.exec('lsattr -El proc0 -a type')
<          if arch =~/type\s(\S+)\s/
<           $1
<          end
<       else
<         model
<       end

This yields:
Good output:
l488pp056_pub[/opt/puppet/pup-puppet/lib/ruby/site_ruby/1.8/facter] > facter 
architecture
PowerPC_POWER7
l488pp056_pub[/opt/puppet/pup-puppet/lib/ruby/site_ruby/1.8/facter] > facter 
hardwaremodel
IBM,9179-MHB

When the hardwaremodel fact contains AIX, then get the architecture from the 
lsattr -El proc0 command.

- Bob

----------------------------------------
Bug #16081: Facter reports bogus arch on AIX
https://projects.puppetlabs.com/issues/16081#change-96400

* Author: Matthaus Owens
* Status: Investigating
* Priority: Normal
* Assignee: Michael Stahnke
* Category: 
* Target version: 
* Keywords: 
* Branch: 
* Affected Facter version: 
----------------------------------------
    root@l488pp139_pub[/software/pe-aix/init] > /opt/puppet/bin/facter
    architecture => IBM,9179-MHB


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to