From c3afd82d3c58fda4af8bd59fbb1d8653aa97cf75 Mon Sep 17 00:00:00 2001
From: Karl Kornel <akkornel@stanford.edu>
Date: Tue, 12 Jan 2016 15:14:44 -0800
Subject: [PATCH] Remove Livermore-specific DNS

---
 NEWS                              |  4 ++++
 manifests/dns.pp                  | 11 -----------
 manifests/dns/resolv_conf.pp      |  5 -----
 templates/dns/etc/resolv.conf.erb |  4 ----
 4 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/NEWS b/NEWS
index e54ab41..6035332 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+unreleased (TBD)
+
+    [dns] Remove Livermore-specific DNS (anycast works there now). (akkornel)
+
 release/004.057 (2016-01-11)
 
     [puppetclient] strip special treatment for Puppet 2.X hosts (jlent)
diff --git a/manifests/dns.pp b/manifests/dns.pp
index c36d7fd..b31ce06 100644
--- a/manifests/dns.pp
+++ b/manifests/dns.pp
@@ -15,21 +15,10 @@ class base::dns(
   $no_resolv_conf = false,
   $dns_cache      = 'NONE',
 ) {
-
-  # Check if we are in Livermore, based on IP address
-  if (   ip_in_cidr($::ipaddress, '204.63.224.0/21')
-      or ip_in_cidr($::ipaddress, '172.20.224.0/21')
-  ) {
-    $livermore = true
-  } else {
-    $livermore = false
-  }
-
   if (!$no_resolv_conf) {
     base::dns::resolv_conf { $::fqdn_lc:
       ensure    => present,
       dns_cache => $dns_cache,
-      livermore => $livermore,
     }
   }
 }
diff --git a/manifests/dns/resolv_conf.pp b/manifests/dns/resolv_conf.pp
index 8adf484..295252b 100644
--- a/manifests/dns/resolv_conf.pp
+++ b/manifests/dns/resolv_conf.pp
@@ -7,7 +7,6 @@ define base::dns::resolv_conf (
   $dns_cache        = 'NONE',
   $first_dns_server = 'NONE',
   $is_dns_server    = false ,
-  $livermore        = false ,
 ) {
   if $::lsbdistcodename == 'santiago' {
     $set_dns_options = true
@@ -22,10 +21,6 @@ define base::dns::resolv_conf (
     $set_dns_cache = false
   }
 
-  if $livermore {
-    $set_livermore_dns = true
-  }
-
   if $first_dns_server != 'NONE' {
     $set_first_dns_server = true
   } else {
diff --git a/templates/dns/etc/resolv.conf.erb b/templates/dns/etc/resolv.conf.erb
index fb1ac9e..c28cea0 100644
--- a/templates/dns/etc/resolv.conf.erb
+++ b/templates/dns/etc/resolv.conf.erb
@@ -50,10 +50,6 @@ nameserver 127.0.0.1
 <% if @set_first_dns_server -%>
 nameserver <%= first_dns_server %>
 <% end -%>
-<% if @set_livermore_dns -%>
-# Livermore DNS server (as of June 2015, there's no anycast in Livermore)
-nameserver 204.63.227.68
-<% end -%>
 # Stanford anycast DNS servers
 nameserver 171.64.1.234
 nameserver 171.67.1.234
-- 
GitLab