Issue #11732 has been updated by Josh Cooper.

Subject changed from Facter (in master) is broken on Windows to Facter (in 
1.6.x) is broken on Windows
Target version set to 1.6.5

This was broken after 1.6.4 was released and is present in 1.6.x. It was broken 
in commit:a1dba380c7bbc6147bdb9f059087385e6ee1ed12 for #11196. Window's arp 
doesn't support the `-n` flag. It's actually not clear why the change was made 
to remove the dependency on the arp fact, since now the logic for running arp 
is in two places.

<pre>
+# Is there an entry in the arp table for fe:ff:ff:ff:ff:ff,
+# this is a red flag for being on amazon
 def has_ec2_arp?
-  !!(Facter.value(:arp) == "fe:ff:ff:ff:ff:ff")
+  arp_table = Facter::Util::Resolution.exec('arp -an')
+  is_amazon_arp = false
+  if not arp_table.nil?
+    arp_table.each_line do |line|
+      is_amazon_arp = true if line.include?('fe:ff:ff:ff:ff:ff')
+      break
+    end
+  end
+  is_amazon_arp
 end
</pre>
----------------------------------------
Bug #11732: Facter (in 1.6.x) is broken on Windows
https://projects.puppetlabs.com/issues/11732

Author: Josh Cooper
Status: Accepted
Priority: High
Assignee: Ken Barber
Category: library
Target version: 1.6.5
Keywords: 
Branch: 
Affected Facter version: 


It's having trouble with the `arp` command that it uses to resolve 
macaddresses. This problem doesn't occur in 1.6.x, just master. I think it's 
running arp with a command line option that Windows doesn't support, so Windows 
spits out a usage message:

<pre>
C:\> facter

Displays and modifies the IP-to-Physical address translation tables used by
address resolution protocol (ARP).

ARP -s inet_addr eth_addr [if_addr]
ARP -d inet_addr [if_addr]
ARP -a [inet_addr] [-N if_addr]

  -a            Displays current ARP entries by interrogating the current
                protocol data.  If inet_addr is specified, the IP and Physical
                addresses for only the specified computer are displayed.  If
                more than one network interface uses ARP, entries for each ARP
                table are displayed.
  -g            Same as -a.
  inet_addr     Specifies an internet address.
  -N if_addr    Displays the ARP entries for the network interface specified
                by if_addr.
  -d            Deletes the host specified by inet_addr. inet_addr may be
                wildcarded with * to delete all hosts.
  -s            Adds the host and associates the Internet address inet_addr
                with the Physical address eth_addr.  The Physical address is
                given as 6 hexadecimal bytes separated by hyphens. The entry
                is permanent.
  eth_addr      Specifies a physical address.
  if_addr       If present, this specifies the Internet address of the
                interface whose address translation table should be modified.
                If not present, the first applicable interface will be used.
Example:
  > arp -s 157.55.85.212   00-aa-00-62-c6-09  .... Adds a static entry.
  > arp -a                                    .... Displays the arp table.

</pre>


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