Issue #16511 has been updated by Alex Harvey.

Actually it's only Solaris 8 and earlier that has this problem -

    # uname -r
    5.8
    # arp -an
    arp: -an: unknown host

    # uname -r
    5.9
    # arp -an |head -4
    
    Net to Media Table: IPv0
    Device   IP Address               Mask      Flags   Phys Addr
    ------ -------------------- --------------- ----- ---------------

The -n option just says don't resolve the hostname to an IP address.

I have Solaris releases where uname -r returns 5.5.1, 5.6, 5.7 & 5.8 (in other 
words, Solaris 2.5.1, 2.6, 7 & 8) that would all be affected by this.

If the proposed fix is just to extend the 'if Facter.value(:kernel)' block with 
additional cases then I can submit a patch.  That's how I fixed it on my test 
host.  I was just a bit worried that there could be a better solution that 
someone more familiar with this code might suggest.  The if statements 
everywhere might get a bit hard to maintain.
----------------------------------------
Bug #16511: EC2 code breaks facter on Solaris 8 and earlier
https://projects.puppetlabs.com/issues/16511#change-73620

Author: Alex Harvey
Status: Accepted
Priority: Normal
Assignee: Alex Harvey
Category: solaris
Target version: 1.6.x
Keywords: solaris
Branch: 
Affected Facter version: 


The following code in lib/facter/util/ec2.rb breaks various facts on versions 
of Unix that do not support the arp -n option.

    # Test if the host has an arp entry in its cache that matches the EC2 arp,
    # which is normally +fe:ff:ff:ff:ff:ff+.
    def has_ec2_arp?
      mac_address = "fe:ff:ff:ff:ff:ff"
      if Facter.value(:kernel) == 'windows'
        arp_command = "arp -a"
        mac_address.gsub!(":","-")
      else
        arp_command = "arp -an"
      end

This results in failures like the following -

    $ facter swapsize
    arp: -an: unknown host
    2.00 GB



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