Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
[FACT-1150] Don't pick scope:link over scope:global IP addresses Created: 2015/07/25 Updated: 2015/09/14 Resolved: 2015/08/13 Status: Project: Component/s: Affects Version/s: Fix Version/s: Closed Facter None FACT 3.0.2 Type: Reporter: Resolution: Labels: Remaining Estimate: Time Spent: Original Estimate: Environment: Bug Daniele Sluijters Fixed None Not Specified Issue Links: Duplicate is duplicated by FACT-1146 Regression: Facter 3 provides link lo... Closed Relates relates to FACT-1147 Interfaces with multiple IPs are not ... Closed Template: Story Points: Sprint: Release Notes: Release Notes Summary: customfield_10700 true 2 Client 2015-08-19 Bug Fix Facter no longer displays link-local IPv6 addresses if a valid IPv6 address is also available for an interface. FACT 3.1.0 Priority: Assignee: Votes: Normal Unassigned 1 Not Specified Not Specified Ubuntu 14.04 Description Looking at the networking hash for one of my interfaces networking.interfaces.eth0.ip6 returns the link local IPv6 address instead of the global, the one that you can actually connect to over the internet. I see no good reason why it should default to the link local address which is useless in about 98% of all cases and not what the user wants. It should never pick a link local address over a global scope address. This becomes even more of a problem because it is picking up the correct network6 value. root@EU1:~# ifconfig eth0 Link encap:Ethernet HWaddr 04:01:5f:2f:c3:01 inet addr:178.62.178.58 Bcast:178.62.191.255 Mask:255.255.192.0 inet6 addr: fe80::601:5fff:fe2f:c301/64 Scope:Link inet6 addr: 2a03:b0c0:0:1010::e:4001/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1539 errors:0 dropped:0 overruns:0 frame:0 TX packets:1313 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:213003 (213.0 KB) TX bytes:203308 (203.3 KB) root@EU1:~# ip a s eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 04:01:5f:2f:c3:01 brd ff:ff:ff:ff:ff:ff inet 178.62.178.58/18 brd 178.62.191.255 scope global eth0 valid_lft forever preferred_lft forever inet6 2a03:b0c0:0:1010::e:4001/64 scope global valid_lft forever preferred_lft forever inet6 fe80::601:5fff:fe2f:c301/64 scope link valid_lft forever preferred_ft forever root@EU1:~# facter networking { fqdn => "EU1", hostname => "EU1", interfaces => { eth0 => { ip => "178.62.178.58", ip6 => "fe80::601:5fff:fe2f:c301", mac => "04:01:5f:2f:c3:01", mtu => 1500, netmask => "255.255.192.0", netmask6 => "ffff:ffff:ffff:ffff::", network => "178.62.128.0", network6 => "2a03:b0c0:0:1010::" }, eth1 => { mac => "04:01:5f:2f:c3:02", mtu => 1500 }, lo => { ip => "127.0.0.1", ip6 => "::1", mtu => 65536, netmask => "255.0.0.0", netmask6 => "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", network => "127.0.0.0", network6 => "::1" } }, ip => "178.62.178.58", ip6 => "fe80::601:5fff:fe2f:c301", mac => "04:01:5f:2f:c3:01", mtu => 1500, netmask => "255.255.192.0", netmask6 => "ffff:ffff:ffff:ffff::", network => "178.62.128.0", network6 => "2a03:b0c0:0:1010::" } Comments Comment by Daniele Sluijters [ 2015/07/27 ] Looking at https://github.com/puppetlabs/facter/commit/4f813e102d8b144f8c90517a5475853dd108d97f this should already be the case but it doesn't appear to be working. root@EU1:~# facter --version 3.0.2 (commit 5dc120fa9db4c19150466b1bbd1d0cf42c87c6bd) root@EU1:~# facter networking { fqdn => "EU1", hostname => "EU1", interfaces => { eth0 => { ip => "178.62.178.58", ip6 => "fe80::601:5fff:fe2f:c301", mac => "04:01:5f:2f:c3:01", mtu => 1500, netmask => "255.255.192.0", netmask6 => "ffff:ffff:ffff:ffff::", network => "178.62.128.0", network6 => "2a03:b0c0:0:1010::" }, eth1 => { mac => "04:01:5f:2f:c3:02", mtu => 1500 }, lo => { ip => "127.0.0.1", ip6 => "::1", mtu => 65536, netmask => "255.0.0.0", netmask6 => "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", network => "127.0.0.0", network6 => "::1" } }, ip => "178.62.178.58", ip6 => "fe80::601:5fff:fe2f:c301", mac => "04:01:5f:2f:c3:01", mtu => 1500, netmask => "255.255.192.0", netmask6 => "ffff:ffff:ffff:ffff::", network => "178.62.128.0", network6 => "2a03:b0c0:0:1010::" } As you can see my ip6 facts are set to something that starts with fe80. Comment by Daniele Sluijters [ 2015/07/27 ] To clarify, this is what ip a s looks like 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 04:01:5f:2f:c3:01 brd ff:ff:ff:ff:ff:ff inet 178.62.178.58/18 brd 178.62.191.255 scope global eth0 valid_lft forever preferred_lft forever inet6 2a03:b0c0:0:1010::e:4001/64 scope global valid_lft forever preferred_lft forever inet6 fe80::601:5fff:fe2f:c301/64 scope link valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 04:01:5f:2f:c3:02 brd ff:ff:ff:ff:ff:ff For the eth0 interface it should not be picking fe80 but 2a03. Comment by R.I.Pienaar [ 2015/08/05 ] +1, be really good to get this fixed Comment by Shaigy Nixon [X] (Inactive) [ 2015/08/13 ] Validated on sles-10-x86_64: evdmi0pnlt6w4fo:/etc/sysconfig/network # facter --version 3.0.2 (commit 32b5cf62ed2e682f8d0e00d9a59eb7ccf44afdb0) evdmi0pnlt6w4fo:/etc/sysconfig/network # ifconfig eth0 Link encap:Ethernet HWaddr 00:50:56:8F:8F:59 inet addr:10.32.121.15 Bcast:10.32.127.255 Mask:255.255.240.0 inet6 addr: 2001:db8:0:f101::1/64 Scope:Global inet6 addr: fe80::250:56ff:fe8f:8f59/64 Scope:Link UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 RX packets:253982 errors:1 dropped:0 overruns:0 frame:0 TX packets:79569 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:139415909 (132.9 Mb) TX bytes:16937131 (16.1 Mb) Interrupt:59 Base address:0x2000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:10 errors:0 dropped:0 overruns:0 frame:0 TX packets:10 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:650 (650.0 b) TX bytes:650 (650.0 b) evdmi0pnlt6w4fo:/etc/sysconfig/network # ip a s eth0 2: eth0: <BROADCAST,MULTICAST,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:50:56:8f:8f:59 brd ff:ff:ff:ff:ff:ff inet 10.32.121.15/20 brd 10.32.127.255 scope global eth0 inet6 2001:db8:0:f101::1/64 scope global valid_lft forever preferred_lft forever inet6 fe80::250:56ff:fe8f:8f59/64 scope link valid_lft forever preferred_lft forever evdmi0pnlt6w4fo:/etc/sysconfig/network # facter networking.interfaces.eth0.ip6 2001:db8:0:f101::1 evdmi0pnlt6w4fo:/etc/sysconfig/network # facter networking { domain => "delivery.puppetlabs.net", fqdn => "evdmi0pnlt6w4fo.delivery.puppetlabs.net", hostname => "evdmi0pnlt6w4fo", interfaces => { eth0 => { bindings => [ { address => "10.32.121.15", netmask => "255.255.240.0", network => "10.32.112.0" } ], bindings6 => [ { address => "2001:db8:0:f101::1", netmask => "ffff:ffff:ffff:ffff::", network => "2001:db8:0:f101::" }, { address => "fe80::250:56ff:fe8f:8f59", netmask => "ffff:ffff:ffff:ffff::", network => "fe80::" } ], ip => "10.32.121.15", ip6 => "2001:db8:0:f101::1", mac => "00:50:56:8f:8f:59", mtu => 1500, netmask => "255.255.240.0", netmask6 => "ffff:ffff:ffff:ffff::", network => "10.32.112.0", network6 => "2001:db8:0:f101::" }, lo => { bindings => [ { address => "127.0.0.1", netmask => "255.0.0.0", network => "127.0.0.0" }, { address => "127.0.0.2", netmask => "255.0.0.0", network => "127.0.0.0" } ], bindings6 => [ { address => "::1", netmask => "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", network => "::1" } ], ip => "127.0.0.2", ip6 => "::1", mtu => 16436, netmask => "255.0.0.0", netmask6 => "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", network => "127.0.0.0", network6 => "::1" }, sit0 => { mtu => 1480 } }, ip => "10.32.121.15", ip6 => "2001:db8:0:f101::1", mac => "00:50:56:8f:8f:59", mtu => 1500, netmask => "255.255.240.0", netmask6 => "ffff:ffff:ffff:ffff::", network => "10.32.112.0", network6 => "2001:db8:0:f101::", primary => "eth0" } Comment by Daniele Sluijters [ 2015/08/19 ] Are we going to see a 3.0.3 release or should this be retargeted to 3.1.0? Comment by Michael Smith [ 2015/08/19 ] We're leaning towards just doing a 3.1.0 release; if that happens, we'll change all the tickets targeted at 3.0.3. Generated at Thu May 11 09:21:47 PDT 2017 using JIRA 6.4.14#64029sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.