Feature #11307
Deprecate the arp fact
| Status: | Needs Decision | Start date: | 12/09/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | library | |||
| Target version: | - | |||
| Keywords: | arp | Affected Facter version: | ||
| Branch: | ||||
Description
The arp fact in lib/facter/arp.rb is useless. It is only used for the ec2 module (see #11196). And because of the nature of ARP (the protocol), the first entry in the ARP-table (the one that makes the fact) can change:
$ sudo arp -en -i eth0 | sed -e 1d
172.29.96.252 ether 40:61:86:51:69:5f C eth0
$ ping -c 1 172.29.96.31
PING 172.29.96.31 (172.29.96.31) 56(84) bytes of data.
64 bytes from 172.29.96.31: icmp_req=1 ttl=64 time=0.336 ms
--- 172.29.96.31 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.336/0.336/0.336/0.000 ms
$ sudo arp -en -i eth0 | sed -e 1d
172.29.96.31 ether bc:ae:c5:aa:52:1b C eth0
172.29.96.252 ether 40:61:86:51:69:5f C eth0
The fact would change from 172.29.96.252 (my gateway) to 172.29.96.31 (some machine I just pinged).
Also, the arp module creates the fact if and only if the first entry in the ARP-table is fe:ff:ff:ff:ff:ff.
So IMHO, this fact in it’s current state is useless. If one would want a fact based on the ARP-table,I would return a comma-separated list of all values in the ARP table.
The same goes for the arp_<interface> facts in lib/facter/util/ip.rb.
Lets have a discussion about this.
History
#1
Updated by James Turnbull over 1 year ago
- Subject changed from Depricate the arp fact to Deprecate the arp fact
#2
Updated by Ken Barber over 1 year ago
- Status changed from Unreviewed to Needs Decision
#3
Updated by Adrien Thebo over 1 year ago
Changing the behavior of this fact is fairly backwards incompatible, so even if it isn’t that useful we can’t readily remove it until a backwards incompatible release, ie Facter 2. Facter 2 should have a lot better way of representing data, so a behavior change would be best suited for that. As for actually deprecating the fact, aside from putting warnings in the comments it’s somewhat hard to deprecate a fact in a manner that’s noticeable.
#4
Updated by Daniel Pittman over 1 year ago
Adrien Thebo wrote:
Changing the behavior of this fact is fairly backwards incompatible, so even if it isn’t that useful we can’t readily remove it until a backwards incompatible release, ie Facter 2. Facter 2 should have a lot better way of representing data, so a behavior change would be best suited for that. As for actually deprecating the fact, aside from putting warnings in the comments it’s somewhat hard to deprecate a fact in a manner that’s noticeable.
Given that people are likely to have used this, wouldn’t it make more sense to replace it with something that does what people actually expect?
Actually, wait – this is another “a machine has a primary interface” fact, isn’t it? Nice. Maybe it should just go away, and people can adapt.