Mark Bergsma has submitted this change and it was merged.
Change subject: Migrate all uses to interface::add_ip6_mapped, remove old
definition
......................................................................
Migrate all uses to interface::add_ip6_mapped, remove old definition
Change-Id: I255775e6263bd9d2caffd0288fb7f83b6995e162
---
M manifests/generic-definitions.pp
M manifests/site.pp
2 files changed, 23 insertions(+), 56 deletions(-)
Approvals:
Mark Bergsma: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/generic-definitions.pp b/manifests/generic-definitions.pp
index d6b88a8..4db23ba 100644
--- a/manifests/generic-definitions.pp
+++ b/manifests/generic-definitions.pp
@@ -468,39 +468,6 @@
}
}
-# WARNING: This function is deprecated, and code will soon be switched
-# over to the new 'interface' module. Until that cut happens
-# THIS CLASS IS FROZEN.
-define interface_add_ip6_mapped($interface=undef, $ipv4_address=undef) {
- if ! $interface {
- $all_interfaces = split($::interfaces, ",")
- $intf = $all_interfaces[0]
- }
- else {
- $intf = $interface
- }
-
- if ! member(split($::interfaces, ","), $intf) {
- warning("Not adding IPv6 address to $intf because this
interface does not exist!")
- }
- else {
- if ! $ipv4_address {
- $ip4_address = "::${::ipaddress}"
- }
- else {
- $ip4_address = "::${ipv4_address}"
- }
-
- $ipv6_address = inline_template("<%= require 'ipaddr';
(IPAddr.new(scope.lookupvar(\"::ipaddress6_${intf}\")).mask(64) |
IPAddr.new(ip4_address.gsub('.', ':'))).to_s() %>")
-
- interface_ip { $title:
- interface => $intf,
- address => $ipv6_address,
- prefixlen => "64"
- }
- }
-}
-
# Definition: interface_offload
#
# Sets interface offload parameters (with ethtool)
diff --git a/manifests/site.pp b/manifests/site.pp
index 80bf681..0dc9c31 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -99,7 +99,7 @@
]
}
- interface_add_ip6_mapped { "main": interface => "eth0" }
+ interface::add_ip6_mapped { "main": interface => "eth0" }
include base,
ganglia
@@ -219,7 +219,7 @@
node /(arsenic|niobium|strontium|palladium)\.(wikimedia\.org|eqiad\.wmnet)/ {
interface_aggregate { "bond0": orig_interface => "eth0", members => [
"eth0", "eth1", "eth2", "eth3" ] }
- interface_add_ip6_mapped { "main":
+ interface::add_ip6_mapped { "main":
require => Interface_aggregate[bond0],
interface => "bond0"
}
@@ -287,7 +287,7 @@
role::ipv6relay
if versioncmp($::lsbdistrelease, "12.04") >= 0 {
- interface_add_ip6_mapped { "main": interface => "eth0" }
+ interface::add_ip6_mapped { "main": interface => "eth0" }
}
}
@@ -304,7 +304,7 @@
include standard,
role::dns::recursor
- interface_add_ip6_mapped { "main": interface => "eth0" }
+ interface::add_ip6_mapped { "main": interface => "eth0" }
}
node /^cp10(0[1-9]|1[0-9]|20)\.eqiad\.wmnet$/ {
@@ -319,7 +319,7 @@
node /^cp10(2[1-9]|3[0-6])\.eqiad\.wmnet$/ {
interface_aggregate { "bond0": orig_interface => "eth0", members => [
"eth0", "eth1" ] }
- interface_add_ip6_mapped { "main":
+ interface::add_ip6_mapped { "main":
require => Interface_aggregate[bond0],
interface => "bond0"
}
@@ -331,14 +331,14 @@
$ganglia_aggregator = true
}
- interface_add_ip6_mapped { "main": }
+ interface::add_ip6_mapped { "main": }
include role::cache::text
}
# eqiad varnish for m.wikipedia.org
node /^cp104[1-4]\.(wikimedia\.org|eqiad\.wmnet)$/ {
- interface_add_ip6_mapped { "main": }
+ interface::add_ip6_mapped { "main": }
include standard
}
@@ -354,7 +354,7 @@
$ganglia_aggregator = true
}
- interface_add_ip6_mapped { "main": }
+ interface::add_ip6_mapped { "main": }
include role::cache::mobile
}
@@ -364,7 +364,7 @@
$ganglia_aggregator = true
}
- interface_add_ip6_mapped { "main": }
+ interface::add_ip6_mapped { "main": }
include role::cache::upload
}
@@ -374,7 +374,7 @@
$ganglia_aggregator = true
}
- interface_add_ip6_mapped { "main": }
+ interface::add_ip6_mapped { "main": }
include role::cache::text
}
@@ -384,7 +384,7 @@
$ganglia_aggregator = true
}
- interface_add_ip6_mapped { "main": }
+ interface::add_ip6_mapped { "main": }
include role::cache::bits
}
@@ -392,7 +392,7 @@
node /^cp300[12]\.esams\.wikimedia\.org$/ {
interface_aggregate { "bond0": orig_interface => "eth0", members => [
"eth0", "eth1" ] }
- interface_add_ip6_mapped { "main":
+ interface::add_ip6_mapped { "main":
require => Interface_aggregate[bond0],
interface => "bond0"
}
@@ -404,13 +404,13 @@
$ganglia_aggregator = true
}
- interface_add_ip6_mapped { "main": }
+ interface::add_ip6_mapped { "main": }
include role::cache::upload
}
node /^cp301[1-4]\.esams\.wikimedia\.org$/ {
- interface_add_ip6_mapped { "main": }
+ interface::add_ip6_mapped { "main": }
include role::cache::mobile
}
@@ -420,7 +420,7 @@
$ganglia_aggregator = true
}
- interface_add_ip6_mapped { "main": }
+ interface::add_ip6_mapped { "main": }
include role::cache::bits
}
@@ -800,7 +800,7 @@
}
node "dysprosium.eqiad.wmnet" {
- interface_add_ip6_mapped { "main": interface => "eth0" }
+ interface::add_ip6_mapped { "main": interface => "eth0" }
include standard
}
@@ -1460,7 +1460,7 @@
},
}
- interface_add_ip6_mapped { "main": interface => "eth0" }
+ interface::add_ip6_mapped { "main": interface => "eth0" }
# Set up tagged interfaces to all subnets with real servers in them
interface_tagged { "eth0.2":
@@ -1634,7 +1634,7 @@
}
# Row D subnets on eth3
- interface_add_ip6_mapped { "main": interface => "eth0" }
+ interface::add_ip6_mapped { "main": interface => "eth0" }
# Make sure GRO is off
interface_manual { "eth1": interface => "eth1", before =>
Interface_offload["eth1 gro"] }
@@ -2505,7 +2505,7 @@
include role::protoproxy::ssl
- interface_add_ip6_mapped { "main": interface => "eth0" }
+ interface::add_ip6_mapped { "main": interface => "eth0" }
}
node /ssl100[1-6]\.wikimedia\.org/ {
@@ -2513,7 +2513,7 @@
$ganglia_aggregator = true
}
- interface_add_ip6_mapped { "main": interface => "eth0" }
+ interface::add_ip6_mapped { "main": interface => "eth0" }
include role::protoproxy::ssl
}
@@ -2523,7 +2523,7 @@
$ganglia_aggregator = true
}
- interface_add_ip6_mapped { "main": interface => "eth0" }
+ interface::add_ip6_mapped { "main": interface => "eth0" }
include role::protoproxy::ssl
}
@@ -2582,7 +2582,7 @@
members => [ "eth0", "eth1", "eth2", "eth3" ]
}
- interface_add_ip6_mapped { "main":
+ interface::add_ip6_mapped { "main":
require => Interface_aggregate[bond0],
interface => "bond0"
}
@@ -2996,7 +2996,7 @@
misc::outreach::civicrm, # contacts.wikimedia.org
misc::etherpad_lite
- interface_add_ip6_mapped { "main": interface => "eth0" }
+ interface::add_ip6_mapped { "main": interface => "eth0" }
}
node default {
--
To view, visit https://gerrit.wikimedia.org/r/77098
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I255775e6263bd9d2caffd0288fb7f83b6995e162
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma <[email protected]>
Gerrit-Reviewer: Mark Bergsma <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits