projects
/
mirror
/
dsa-puppet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0b6cb05
)
Move debug healthcheck info to hiera
author
Peter Palfrader
<peter@palfrader.org>
Sun, 22 Sep 2019 12:48:08 +0000
(14:48 +0200)
committer
Peter Palfrader
<peter@palfrader.org>
Sun, 22 Sep 2019 12:48:08 +0000
(14:48 +0200)
data/common.yaml
patch
|
blob
|
history
data/nodes/mirror-accumu.debian.org.yaml
patch
|
blob
|
history
data/nodes/schmelzer.debian.org.yaml
patch
|
blob
|
history
modules/mirror_health/manifests/service.pp
patch
|
blob
|
history
modules/roles/manifests/debug_mirror.pp
patch
|
blob
|
history
diff --git
a/data/common.yaml
b/data/common.yaml
index
6c569ed
..
234bf02
100644
(file)
--- a/
data/common.yaml
+++ b/
data/common.yaml
@@
-124,15
+124,6
@@
roles:
- '[2a02:16a8:dc41:100::232]:80'
fastly-backend: true
service-hostname: conova.debian.backend.mirrors.debian.org
- '[2a02:16a8:dc41:100::232]:80'
fastly-backend: true
service-hostname: conova.debian.backend.mirrors.debian.org
- debug_mirror:
- # XXX still used by the mirror health stuff
- mirror-accumu.debian.org:
- service-hostname: accumu.debug.backend.mirrors.debian.org
- schmelzer.debian.org:
- service-hostname: conova.debug.backend.mirrors.debian.org
- debug_mirror_onion:
- - mirror-accumu.debian.org
- - schmelzer.debian.org
bgp:
- mirror-accumu.debian.org
- mirror-skroutz.debian.org
bgp:
- mirror-accumu.debian.org
- mirror-skroutz.debian.org
diff --git
a/data/nodes/mirror-accumu.debian.org.yaml
b/data/nodes/mirror-accumu.debian.org.yaml
index
2f885b9
..
92bf38e
100644
(file)
--- a/
data/nodes/mirror-accumu.debian.org.yaml
+++ b/
data/nodes/mirror-accumu.debian.org.yaml
@@
-3,3
+3,4
@@
classes:
- roles::debug_mirror
roles::debug_mirror::onion_service: true
- roles::debug_mirror
roles::debug_mirror::onion_service: true
+roles::debug_mirror::healthcheck_name: accumu.debug.backend.mirrors.debian.org
diff --git
a/data/nodes/schmelzer.debian.org.yaml
b/data/nodes/schmelzer.debian.org.yaml
index
bfff689
..
dd405fd
100644
(file)
--- a/
data/nodes/schmelzer.debian.org.yaml
+++ b/
data/nodes/schmelzer.debian.org.yaml
@@
-6,6
+6,7
@@
classes:
roles::debug_mirror::listen_addr: ['217.196.149.232', '2a02:16a8:dc41:100::232']
roles::debug_mirror::onion_service: true
roles::debug_mirror::listen_addr: ['217.196.149.232', '2a02:16a8:dc41:100::232']
roles::debug_mirror::onion_service: true
+roles::debug_mirror::healthcheck_name: conova.debug.backend.mirrors.debian.org
roles::syncproxy::syncproxy_name: syncproxy4.eu.debian.org
roles::syncproxy::listen_addr: ['217.196.149.237', '2a02:16a8:dc41:100::237']
roles::historical_mirror::listen_addr: ['217.196.149.234', '2a02:16a8:dc41:100::234']
roles::syncproxy::syncproxy_name: syncproxy4.eu.debian.org
roles::syncproxy::listen_addr: ['217.196.149.237', '2a02:16a8:dc41:100::237']
roles::historical_mirror::listen_addr: ['217.196.149.234', '2a02:16a8:dc41:100::234']
diff --git
a/modules/mirror_health/manifests/service.pp
b/modules/mirror_health/manifests/service.pp
index
312a63d
..
e302f80
100644
(file)
--- a/
modules/mirror_health/manifests/service.pp
+++ b/
modules/mirror_health/manifests/service.pp
@@
-1,8
+1,8
@@
# base class for Debian's mirror-health checker
define mirror_health::service (
# base class for Debian's mirror-health checker
define mirror_health::service (
- String $this_host_service_name,
String $url,
String $health_url,
String $url,
String $health_url,
+ String $this_host_service_name = $::fqdn,
String $check_service = $name,
Integer $check_interval = 60,
Enum['present','absent'] $ensure = 'present',
String $check_service = $name,
Integer $check_interval = 60,
Enum['present','absent'] $ensure = 'present',
diff --git
a/modules/roles/manifests/debug_mirror.pp
b/modules/roles/manifests/debug_mirror.pp
index
38983c0
..
4975c41
100644
(file)
--- a/
modules/roles/manifests/debug_mirror.pp
+++ b/
modules/roles/manifests/debug_mirror.pp
@@
-2,9
+2,11
@@
#
# @param listen_addr IP addresses to have apache listen on
# @param onion_service provide the onion service from this host
#
# @param listen_addr IP addresses to have apache listen on
# @param onion_service provide the onion service from this host
+# @param healthcheck_name name to access this node in the health checker
class roles::debug_mirror(
Array[Stdlib::IP::Address] $listen_addr = [],
Boolean $onion_service = false,
class roles::debug_mirror(
Array[Stdlib::IP::Address] $listen_addr = [],
Boolean $onion_service = false,
+ Optional[String] $healthcheck_name = undef,
) {
include roles::archvsync_base
include apache2
) {
include roles::archvsync_base
include apache2
@@
-41,8
+43,13
@@
class roles::debug_mirror(
Ferm::Rule::Simple <<| tag == 'ssh::server::from::ftp_master' |>>
Ferm::Rule::Simple <<| tag == 'ssh::server::from::ftp_master' |>>
+ $healthcheck_ensure = $healthcheck_name == undef ? {
+ true => 'absent',
+ default => 'present',
+ }
mirror_health::service { 'debug':
mirror_health::service { 'debug':
- this_host_service_name => hiera('roles.debug_mirror')[$::fqdn]['service-hostname'],
+ ensure => healthcheck_ensure,
+ this_host_service_name => $healthcheck_name,
url => 'http://debug.backend.mirrors.debian.org/debian-debug/dists/sid-debug/Release',
health_url => 'http://debug.backend.mirrors.debian.org/_health',
}
url => 'http://debug.backend.mirrors.debian.org/debian-debug/dists/sid-debug/Release',
health_url => 'http://debug.backend.mirrors.debian.org/_health',
}