]> git.openstreetmap.org Git - chef.git/commitdiff
Merge remote-tracking branch 'github/pull/122'
authorTom Hughes <tom@compton.nu>
Wed, 10 May 2017 07:27:11 +0000 (08:27 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 10 May 2017 07:27:11 +0000 (08:27 +0100)
24 files changed:
cookbooks/chef/attributes/default.rb
cookbooks/chef/recipes/default.rb
cookbooks/devices/templates/default/udev.rules.erb
cookbooks/dhcpd/templates/default/dhcpd.conf.erb
cookbooks/exim/templates/default/exim4.conf.erb
cookbooks/nominatim/recipes/default.rb
cookbooks/nominatim/templates/default/apache.erb
cookbooks/planet/templates/default/replication.cron.erb
roles/angor.rb
roles/eddie.rb [new file with mode: 0644]
roles/ironbelly.rb
roles/pummelzacken.rb
roles/tiamat-00.rb
roles/tiamat-01.rb
roles/tiamat-02.rb
roles/tiamat-10.rb
roles/tiamat-11.rb
roles/tiamat-12.rb
roles/tiamat-13.rb
roles/tiamat-20.rb
roles/tiamat-21.rb
roles/tiamat-22.rb
roles/tiamat-23.rb
roles/tilecache.rb

index 4aa59baa7240e930aa8dcf2c8109627573841f80..06db9bf6d6b98ab19b73522299c4f3cc3ba9aebf 100644 (file)
@@ -5,4 +5,4 @@ default[:apt][:sources] = node[:apt][:sources] | ["opscode"]
 default[:chef][:server][:version] = "12.13.0-1"
 
 # Set the default client version
-default[:chef][:client][:version] = "12.19.36"
+default[:chef][:client][:version] = "12.20.3"
index 2e2e345a11374886d93acdb60e6294c54d8de91e..35ed0d87e6b116ac5cb8c7267d0d96ea210b1d17 100644 (file)
@@ -112,7 +112,6 @@ if node[:lsb][:release].to_f >= 15.10
     description "Chef client"
     after "network.target"
     exec_start "/usr/bin/chef-client -i 1800 -s 20"
-    success_exit_status 3
     restart "on-failure"
   end
 else
@@ -126,6 +125,9 @@ end
 
 service "chef-client" do
   action [:enable, :start]
+  if node[:lsb][:release].to_f >= 15.10
+    restart_command "systemctl kill --signal=TERM chef-client.service"
+  end
   supports :status => true, :restart => true, :reload => true
   subscribes :restart, "dpkg_package[chef]"
   subscribes :restart, "template[/etc/init/chef-client.conf]"
index d37fcb9eb55bb84ba6c73cad242a55824d2d7206..114de0d51466a6d106dad651eef8c3eab517d69e 100644 (file)
@@ -27,3 +27,21 @@ ACTION=="add", SUBSYSTEM=="block", ENV{ID_BUS}=="<%= device[:bus] %>", ENV{ID_SE
 
 # Disable scatter-gather offload for HP NC362i network controllers
 SUBSYSTEM=="net", ACTION=="add", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x10c9", ATTRS{subsystem_vendor}=="0x103c", ATTRS{subsystem_device}=="0x323f", RUN+="/sbin/ethtool -K $name gso off tso off sg off gro off"
+
+# Workaround unreliable Western Digital WD RE3/RE4 disks (ATA only)
+# Set sufficent Linux subsystem timeout
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="WDC_WD1002FBYS-02A6B0", ATTR{device/timeout}="90"
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="WDC_WD1003FBYX-01Y7B0", ATTR{device/timeout}="90"
+# Disable Disk Write Cache, Set AAM and Power Management correctly
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="WDC_WD1002FBYS-02A6B0", RUN+="/sbin/hdparm -q -W0 -q -M254 $env{DEVNAME}"
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="WDC_WD1003FBYX-01Y7B0", RUN+="/sbin/hdparm -q -W0 -q -M254 -q -B254 $env{DEVNAME}"
+
+# Set Disks TLED / SCT Error Recovery Control
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="WDC_WD1002FBYS-02A6B0", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,70,70 $env{DEVNAME}"
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="WDC_WD1003FBYX-01Y7B0", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,70,70 $env{DEVNAME}"
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="WDC_WD5000AAKS-00A7B0", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,70,70 $env{DEVNAME}"
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="WDC_WD2000FYYZ-01UL1B2", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,70,70 $env{DEVNAME}"
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="TOSHIBA_DT01ACA300", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,70,70 $env{DEVNAME}"
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="ST31000340NS", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,100,100 $env{DEVNAME}"
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="HGST_HTS725050A7E630", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,100,100 $env{DEVNAME}"
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="HGST_HTE721010A9E630", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,100,100 $env{DEVNAME}"
index 6728745babccff3bf72631048adc57184ed78151..d57fd109dda629de851fe0424b41a7b88d4391bf 100644 (file)
@@ -56,6 +56,12 @@ host draco.oob.openstreetmap.org {
   fixed-address draco.oob.openstreetmap.org;
 }
 
+host eddie.oob.openstreetmap.org {
+  hardware ethernet 0c:c4:7a:d5:8c:c0;
+  server-name "eddie.oob.openstreetmap.org";
+  fixed-address eddie.oob.openstreetmap.org;
+}
+
 host errol.oob.openstreetmap.org {
   hardware ethernet 00:e0:81:c0:8d:01;
   server-name "errol.oob.openstreetmap.org";
@@ -164,12 +170,66 @@ host spike-03.oob.openstreetmap.org {
   fixed-address spike-03.oob.openstreetmap.org;
 }
 
+host tiamat-00.oob.openstreetmap.org {
+  hardware ethernet 00:25:90:1a:76:01;
+  server-name "tiamat-00.oob.openstreetmap.org";
+  fixed-address tiamat-00.oob.openstreetmap.org;
+}
+
+host tiamat-01.oob.openstreetmap.org {
+  hardware ethernet 00:25:90:1a:75:78;
+  server-name "tiamat-01.oob.openstreetmap.org";
+  fixed-address tiamat-01.oob.openstreetmap.org;
+}
+
+host tiamat-02.oob.openstreetmap.org {
+  hardware ethernet 00:25:90:1f:10:e3;
+  server-name "tiamat-02.oob.openstreetmap.org";
+  fixed-address tiamat-02.oob.openstreetmap.org;
+}
+
+host tiamat-03.oob.openstreetmap.org {
+  hardware ethernet 00:25:90:1a:75:74;
+  server-name "tiamat-03.oob.openstreetmap.org";
+  fixed-address tiamat-03.oob.openstreetmap.org;
+}
+
+host tiamat-11.oob.openstreetmap.org {
+  hardware ethernet 00:25:90:2c:cd:68;
+  server-name "tiamat-11.oob.openstreetmap.org";
+  fixed-address tiamat-11.oob.openstreetmap.org;
+}
+
+host tiamat-12.oob.openstreetmap.org {
+  hardware ethernet 00:25:90:1f:0a:9c;
+  server-name "tiamat-12.oob.openstreetmap.org";
+  fixed-address tiamat-12.oob.openstreetmap.org;
+}
+
+host tiamat-13.oob.openstreetmap.org {
+  hardware ethernet 00:25:90:1f:17:ed;
+  server-name "tiamat-13.oob.openstreetmap.org";
+  fixed-address tiamat-13.oob.openstreetmap.org;
+}
+
+host tiamat-21.oob.openstreetmap.org {
+  hardware ethernet 00:25:90:29:a8:d7;
+  server-name "tiamat-21.oob.openstreetmap.org";
+  fixed-address tiamat-21.oob.openstreetmap.org;
+}
+
 host tiamat-22.oob.openstreetmap.org {
   hardware ethernet 00:25:90:29:a8:01;
   server-name "tiamat-22.oob.openstreetmap.org";
   fixed-address tiamat-22.oob.openstreetmap.org;
 }
 
+host tiamat-23.oob.openstreetmap.org {
+  hardware ethernet 00:25:90:29:a7:ff;
+  server-name "tiamat-23.oob.openstreetmap.org";
+  fixed-address tiamat-23.oob.openstreetmap.org;
+}
+
 host thorn-01.oob.openstreetmap.org {
   hardware ethernet 00:19:bb:35:87:94;
   server-name "thorn-01.oob.openstreetmap.org";
index 4b60719205cb1482128a2dee84698c1dbb896c13..d9d12f83bab3b89c7a86c0fe2840afa5308fadc2 100644 (file)
@@ -498,11 +498,10 @@ acl_check_data:
 
 <% end -%>
   # Deny spammy messages with headers of the form:
-  #   X-PHP-Originating-Script: <digits>:SendMail.php
-  #   X-PHP-Originating-Script: <digits>:SendMail.class.php
-  #   X-PHP-Originating-Script: <digits>:ExtendedMail.php
-  #   X-PHP-Originating-Script: <digits>:ExtendedMail.class.php
-  deny    condition  = ${if match {$h_X-PHP-Originating-Script:}{^[0-9]+:(Send|Extended)[Mm]ail(\\.class)?\\.php\$}}
+  #   X-PHP-Originating-Script: <digits>:<name>.php
+  #   X-PHP-Originating-Script: <digits>:<name>.class.php
+  deny    condition  = ${if match {$h_X-PHP-Originating-Script:}{^[0-9]+:[A-Za-z]+(\\.class)?\\.php\$}}
+         !hosts      = +relay_from_hosts
           message    = This message failed local spam checks.
 
   # Accept the message.
index 19e48909f9f0bfb4c8f19f537222ac8a0ccbac60..a8009759ff3dba77926ab82870173bf54b2d8b5e 100644 (file)
@@ -306,6 +306,7 @@ apache_module "proxy"
 apache_module "proxy_fcgi"
 apache_module "proxy_http"
 apache_module "headers"
+apache_module "reqtimeout"
 
 service "php7.0-fpm" do
   action [:enable, :start]
@@ -357,7 +358,7 @@ web_servers = search(:node, "recipes:web\\:\\:frontend").collect do |n| # ~FC010
 end.flatten
 
 fail2ban_filter "nominatim" do
-  failregex '^<HOST> - - \[\] "[^"]+" (400|429) '
+  failregex '^<HOST> - - \[\] "[^"]+" (408|429) '
 end
 
 fail2ban_jail "nominatim" do
index b79e76dbee2ebb81fcc47ff5659aa2a5c7b9cb3a..652fd93a334251e9a3133f1d3a4f2e5062dc5b8e 100644 (file)
@@ -25,6 +25,8 @@
     # Remove Proxy request header to mitigate https://httpoxy.org/
     RequestHeader unset Proxy early
 
+    RequestReadTimeout header=15-30,MinRate=500 body=15-30,MinRate=500
+
     CustomLog /var/log/apache2/nominatim.openstreetmap.org-access.log combined
     ErrorLog /var/log/apache2/nominatim.openstreetmap.org-error.log
 
index 84ee83c7cc196eb416e07ac455cdfd04e2995452..8b81f03e0aa148423232be89e439e5adc6ad6faa 100644 (file)
@@ -11,5 +11,5 @@ MAILTO=brett@bretth.com
 LD_PRELOAD=/opt/flush/flush.so
 
 * * * * * planet /usr/local/bin/osmosis -q --replicate-apidb authFile=/etc/replication/auth.conf validateSchemaVersion=false --write-replication workingDirectory=/store/planet/replication/minute
-2 * * * * planet /home/bretth/bin/osmosis -q --merge-replication-files workingDirectory=/var/lib/replication/hour
-5 * * * * planet /home/bretth/bin/osmosis -q --merge-replication-files workingDirectory=/var/lib/replication/day
+5 * * * * planet /home/bretth/bin/osmosis -q --merge-replication-files workingDirectory=/var/lib/replication/hour
+10 * * * * planet /home/bretth/bin/osmosis -q --merge-replication-files workingDirectory=/var/lib/replication/day
index 143228f9ae6d3162d32e01428703f67cc78d16c3..da5d426cee6bc820d5e27631c07cbd00aec9a285 100644 (file)
@@ -39,6 +39,5 @@ default_attributes(
 )
 
 run_list(
-  "role[inxza]",
-  "role[tilecache]"
+  "role[inxza]"
 )
diff --git a/roles/eddie.rb b/roles/eddie.rb
new file mode 100644 (file)
index 0000000..eb6753f
--- /dev/null
@@ -0,0 +1,59 @@
+name "eddie"
+description "Master role applied to eddie"
+
+default_attributes(
+  :apt => {
+    :sources => ["postgresql"]
+  },
+  :db => {
+    :cluster => "9.5/main"
+  },
+  :networking => {
+    :interfaces => {
+      :internal_ipv4 => {
+        :interface => "enp1s0f0.2801",
+        :role => :internal,
+        :family => :inet,
+        :address => "10.0.0.10"
+      }
+    }
+  },
+  :postgresql => {
+    :settings => {
+      :defaults => {
+        :shared_buffers => "64GB",
+        :work_mem => "64MB",
+        :maintenance_work_mem => "1GB",
+        :effective_cache_size => "180GB",
+        :effective_io_concurrency => "256"
+      }
+    }
+  },
+  :sysctl => {
+    :postgres => {
+      :comment => "Increase shared memory for postgres",
+      :parameters => {
+        "kernel.shmmax" => 66 * 1024 * 1024 * 1024,
+        "kernel.shmall" => 66 * 1024 * 1024 * 1024 / 4096
+      }
+    }
+  },
+  :sysfs => {
+    :md_tune => {
+      :comment => "Enable request merging for NVMe devices",
+      :parameters => {
+        "block/nvme0n1/queue/nomerges" => "1",
+        "block/nvme1n1/queue/nomerges" => "1",
+        "block/nvme2n1/queue/nomerges" => "1",
+        "block/nvme3n1/queue/nomerges" => "1",
+        "block/nvme4n1/queue/nomerges" => "1",
+        "block/nvme5n1/queue/nomerges" => "1",
+        "block/nvme6n1/queue/nomerges" => "1"
+      }
+    }
+  }
+)
+
+run_list(
+  "role[ucl]"
+)
index d5bb0ee33325b05dfb683cc9874d779777dcab0b..ab306c6a2e5bb7d709dc076ece8b4fa983f176de 100644 (file)
@@ -23,7 +23,7 @@ default_attributes(
     }
   },
   :git => {
-    :allowed_nodes => "*:*",
+    :allowed_nodes => "fqdn:*",
     :user => "chefrepo",
     :group => "chefrepo",
     :backup => "chef-git"
index 70c90a0ca72cb2cd13772c8652eb328f947bc8bc..f5a573d47d01e952b31893b7b511065c387d56f1 100644 (file)
@@ -27,7 +27,7 @@ default_attributes(
         :maintenance_work_mem => "10GB",
         :random_page_cost => "1.5",
         :effective_cache_size => "60GB",
-        :fsync => "off"
+        :fsync => "on"
       }
     }
   },
index 5e0f104786edaba87a74d984c6cd5af81edc3333..0deb7ca89f321fedc08651c8d5f1705740f7d7df 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.40"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index 2d3aff40759e96873a7c223072007dc80b7aa712..b2b0eb19d161666fb20a08980be6e5f9e0e76ad2 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.41"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index d8a2ed0c978632036b03815d5829b78b35af8dca..de959961ddc8d67857b1826623dca98e059b2a90 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.42"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index 2d8b6e557f573f9739c5fb2401aa94c96c5113ca..a0d1c3994c1a1fa993cc3ed7e6a65ab8a9e622dc 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.44"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index b698d11c1c0ddbc46a9e3e7e04d4b07b2012cecf..dce0c78703772aeb3af227f00958ed6cce9eabd3 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.45"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index 9dc3719629adb9df10a4b8c50b69973f76b167ce..66145154c898c55ca80fa0b773b2adf9dc0f5a69 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.46"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index 90b83797dbf7b07176475ef18715a111dc88a6a6..a7ad81f0c5def4c98c0928224d5a17d0aaa33f66 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.47"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index 48a33794fc67a5e36acbe5ecbf731a727d5ca4f9..576d5c8786902b1f7fb804fe0e38ab4d35ad848a 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.48"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index 33badf508abe938c0ff52dbcef6a110370c6706d..082dd40eff6b369b18bc5d154d55e147c081a144 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.49"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index f2359438bd72784199017f3f9c88f13e357abaa3..09f9238ac8da0d0f54395c08f84e7c7e4e7fa6ee 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.50"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index 886e5f611e6f118d0a3a54f67b6d0f3593ebe39f..dacc1ce2ce2fbae5fe0c8dd3d21fb927f5f3597c 100644 (file)
@@ -17,6 +17,9 @@ default_attributes(
         :address => "193.60.236.51"
       }
     }
+  },
+  :hardware => {
+    :watchdog => "w83627hf_wdt"
   }
 )
 
index 8e6da21eeb45674c4c5ffdedafd18ed9fde333aa..313c262f49e148cea605e46881f1b750d84a13e8 100644 (file)
@@ -12,13 +12,6 @@ default_attributes(
   :apt => {
     :sources => ["nginx"]
   },
-  :munin => {
-    :plugins => {
-      :cpu => {
-        :user => { :warning => 200, :critical => 400 }
-      }
-    }
-  },
   :sysctl => {
     :network_conntrack_time_wait => {
       :comment => "Only track completed connections for 30 seconds",