Cody Herriges <[email protected]> writes:
> On Jun 16, 2010, at 8:32 PM, Daniel Pittman wrote:
>> Cody Herriges <[email protected]> writes:
[...]
>>> +Facter.add(:ipaddress6) do
>>> + confine :kernel => :linux
>>> + setcode do
>>> + ip = nil
>>> + output = %x{/sbin/ifconfig}
>>
>> This would enormously better use /sbin/ip from iproute2, if available, since
>> that can report addresses that are simply invisible to /sbin/ifconfig. This
>> includes secondary addresses assigned to the same adapter without an alias
>> name, and causes issues with IPv4 as well.
>
> I would say that a machine's primary IP address will be visible by ifconfig
> and the ipaddress/ipaddress6 facts have always assumed that the machine's
> primary ipaddress resides on the lowest numbered interface, often eth0.
The assumption that the "primary" IP address exists, or that it is the one
that shows up with ifconfig, so a bit bogus: on a number of my hosts, for
example, the "primary" IP address is an additional address added by ip and not
visible at all.
(Assuming by "primary" you mean "the one that anything except admin tools talk
to", in this case because they are high-availability services and all. :)
> I know this doesn't hold true beyond Linux as traditional unixes name
> interfaces by driver. The ip.rb util could likely benefit from the
> conversion from `ifconfig` to `ip` and I will look at this when I start
> looking at patching ip.rb.
>
> I am far from done thinking through and patching all the pieces of this but
> it was requested on the ticket tracker to ship off what I had started and my
> thoughts to the dev list before I moved much further.
Sure. Obviously, y'all feel there is good reason to maintain and extend this
somewhat broken model of IP addresses; beyond trying to make sure these
complexities have been considered, and don't get too pervasive and start to
make my life harder, I don't mind. :)
Daniel
--
✣ Daniel Pittman ✉ [email protected] ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev?hl=en.