This is something I found after upgrading a number of puppet agents from 3.8.5 to 4.4.2 using the puppet-agent-1.4.2-1.el6.x86_64.rpm rpm on CentOS 6. The legacy fact names around vlan interfaces are not the same as the facter2 versions of those facts.
facter < 3: ipaddress_eth0_413 facter >= 3: ipaddress_eth0.413 There was a pull request to have this change implemented in facter 2 but that wasn't merged. I wasn't able to find any ticket about behavioural change for these facts in facter 3. I tried digging through the facter code but am not a programmer and couldn't figure out where this fact name is set in cfacter. https://github.com/puppetlabs/facter/pull/835 https://tickets.puppetlabs.com/browse/FACT-775 FACT-701 appears related, only in so far as it covers the same set of facts. https://tickets.puppetlabs.com/browse/FACT-701 The upshot is that I probably should already have converted to the facter 3 structured facts. Anybody else using vlan'ed networking and the associated facts in puppet3/facter2 should probably check their modules. ++++++++++ More details: To make a long story short, we are managing some vlan interfaces on eth0 using stanzas like the inline template below. This is to figure out the nfs ip address on the host to construct an ip address for use on another vlan'ed interface. That's life when workarounds are built on workarounds. $nfs_if_ip = inline_template('<%= x = "ipaddress_eth0_" + @cluster_nfs_vlan.to_s; scope[x] %>') In facter < 3, that fact was ipaddress_eth0_413. In facter >= 3, that fact is ipaddress_eth0.413 (underline versus dot). The latter format mirrors what you would see with "ip a s" which would give vlan'ed interfaces such as eth0.413@eth0. The upshot is that the "unless" parameter of the exec bringing up the interface ended up being... /sbin/ip addr show eth0.601 | grep -q 10.106.2./24 ...instead of... /sbin/ip addr show eth0.601 | grep -q 10.106.2.84/24 ...and that failed 'unless' let forth the error spew. Notice: /Stage[main]/Hnet/Exec[/sbin/ip link add link eth0 name eth0.601 type vlan id 601 && /sbin/ip addr add 10.106.2./24 dev eth0.601 label eth0.601 && /sbin/ip link set eth0.601 up]/returns: RTNETLINK answers: File exists Error: /sbin/ip link add link eth0 name eth0.601 type vlan id 601 && /sbin/ip addr add 10.106.2./24 dev eth0.601 label eth0.601 && /sbin/ip link set eth0.601 up returned 2 instead of one of [0] Error: /Stage[main]/Hnet/Exec[/sbin/ip link add link eth0 name eth0.601 type vlan id 601 && /sbin/ip addr add 10.106.2./24 dev eth0.601 label eth0.601 && /sbin/ip link set eth0.601 up]/returns: change from notrun to 0 failed: /sbin/ip link add link eth0 name eth0.601 type vlan id 601 && /sbin/ip addr add 10.106.2./24 dev eth0.601 label eth0.601 && /sbin/ip link set eth0.601 up returned 2 instead of one of [0] Here's narrowing down where this change takes place. Pasting my rough notes. I've obfuscated the hostname and non-RFC-1918 ip address. puppet-agent-1.0.0-1.el6.x86_64.rpm [root@host ~]# puppet --version 4.0.0 [root@host ~]# facter --version 2.4.3 [root@host ~]# facter -p | grep ipaddress_eth0 ipaddress_eth0 => 1.2.3.4 ipaddress_eth0_413 => 10.101.13.84 ipaddress_eth0_601 => 10.106.2.84 puppet-agent-1.1.1-1.el6.x86_64.rpm [root@host ~]# puppet --version 4.1.0 [root@host ~]# facter --version 2.4.4 [root@host ~]# facter -p | grep ipaddress_eth0 ipaddress_eth0 => 1.2.3.4 ipaddress_eth0_413 => 10.101.13.84 ipaddress_eth0_601 => 10.106.2.84 puppet-agent-1.2.0-1.el6.x86_64.rpm [root@host ~]# puppet --version 4.2.0 [root@host ~]# facter --version 3.0.0 (commit 6a22df024ddfe7759f55d05a5ac1c8c51cb2c4aa) (no ipaddress_eth0 legacy facts, same as below) puppet-agent-1.2.1-1.el6.x86_64.rpm [root@host ~]# puppet --version 4.2.0 [root@host ~]# facter --version 3.0.1 (commit 9b1ef723a1494a01e0eccfe93a75fd43316690c2) [root@host ~]# facter -p --show-legacy | grep ipaddress_eth0 error: unrecognised option '-p' [root@host ~]# facter --show-legacy | grep ipaddress_eth0 error: unrecognised option '--show-legacy' puppet-agent-1.2.1-1.el6.x86_64.rpm [root@host ~]# puppet --version 4.2.1 [root@host ~]# facter --version 3.0.2 (commit 5dc120fa9db4c19150466b1bbd1d0cf42c87c6bd) [root@host ~]# facter -p --show-legacy | grep ipaddress_eth0 ipaddress_eth0 => 1.2.3.4 ipaddress_eth0.413 => 10.101.13.84 ipaddress_eth0.601 => 10.106.2.84 puppet-agent-1.2.4-1.el6.x86_64.rpm [root@host ~]# puppet --version 4.2.2 [root@host ~]# facter --version 3.1.0 (commit fc7614d6ba81845757ba7318269fad2b2da08da3) [root@host ~]# facter -p --show-legacy | grep ipaddress_eth0 ipaddress_eth0 => 1.2.3.4 ipaddress_eth0.413 => 10.101.13.84 ipaddress_eth0.601 => 10.106.2.84 puppet-agent-1.2.7-1.el6.x86_64.rpm [root@host ~]# puppet --version 4.2.3 [root@host ~]# facter --version 3.1.1 (commit 30d2dfd3ede25be8a02cdb5b0811d84c5c92c709) [root@host ~]# facter -p --show-legacy | grep ipaddress_eth0 2016-06-01 10:36:20.825993 ERROR puppetlabs.facter - error while resolving custom fact "pe_version": undefined method `match' for nil:NilClass ipaddress_eth0 => 1.2.3.4 ipaddress_eth0.413 => 10.101.13.84 ipaddress_eth0.601 => 10.106.2.84 puppet-agent-1.4.2-1.el6.x86_64.rpm [root@host ~]# puppet --version 4.4.2 [root@host ~]# facter --version 3.1.6 (commit 3a021f47393001e7acdde60e53ff8ac0cc04a9ec) [root@host ~]# facter -p --show-legacy | grep ipaddress_eth0 ipaddress_eth0 => 1.2.3.4 ipaddress_eth0.413 => 10.101.13.84 ipaddress_eth0.601 => 10.106.2.84 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20160601160119.GA17712%40iniquitous.heresiarch.ca. For more options, visit https://groups.google.com/d/optout.