Puppet Class: profile::dumps::generation::server::xmldumps

Defined in:
modules/profile/manifests/dumps/generation/server/xmldumps.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • dumps_single_backend (Any) (defaults to: lookup('profile::dumps::single_backend'))
  • internals (Any) (defaults to: lookup('profile::dumps::internal'))
  • publics (Any) (defaults to: lookup('profile::dumps::public'))
  • xmldumpsdir (Any) (defaults to: lookup('profile::dumps::xmldumpsdir'))


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'modules/profile/manifests/dumps/generation/server/xmldumps.pp', line 2

class profile::dumps::generation::server::xmldumps(
    $dumps_single_backend = lookup('profile::dumps::single_backend'),
    $internals = lookup('profile::dumps::internal'),
    $publics = lookup('profile::dumps::public'),
    $xmldumpsdir = lookup('profile::dumps::xmldumpsdir'),
) {
    require profile::dumps::generation::server::common

    if (!$dumps_single_backend) {

        $xmlpublicdests = $publics.map |$p| {"${p}::data/xmldatadumps/public/"}.join(',')

        if !empty($internals) {
            $internaldests = $internals.map |$i| {"${i}::data/xmldatadumps/public/"}.join(',')
            $xmlremotedirs = "${internaldests},${xmlpublicdests}"
        } else {
            $xmlremotedirs = $xmlpublicdests
        }

        class { '::dumps::generation::server::rsyncer_xml':
            xmldumpsdir   => $xmldumpsdir,
            xmlremotedirs => $xmlremotedirs,
        }
    }

    nrpe::monitor_service { 'dumps_store_load_average':
        description  => 'high load average on dumps nfs store',
        nrpe_command => '/usr/lib/nagios/plugins/check_load -w 30,20,10 -c 100,80,50',
        notes_url    => 'https://wikitech.wikimedia.org/wiki/Dumps/XML-SQL_Dumps#Troubleshooting',
    }
}