Puppet Class: raid::md

Defined in:
modules/raid/manifests/md.pp

Overview

MD RAID controller

Parameters:

  • cron_ensure (Enum['present', 'absent']) (defaults to: 'present')


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
33
34
35
36
# File 'modules/raid/manifests/md.pp', line 2

class raid::md (
    Enum['present', 'absent'] $cron_ensure = 'present',
) {
  include raid

  # T162013 - reduce raid resync speeds on clustered etcd noes with software RAID
  # in order to mitigate the risk of losing consensus due to I/O latencies
  sysctl::parameters { 'raid_resync_speed':
      ensure => present,
      values => { 'dev.raid.speed_limit_max' => '20000' },
  }
  # Only run on a weekday of our choice, and vary it between servers
  $dow = fqdn_rand(5, 'md_checkarray') + 1
  # Replace the default mdadm script from upstream with our own
  file { '/etc/cron.d/mdadm':
      ensure  => $cron_ensure,
      content => template('raid/mdadm-cron.erb'),
      owner   => 'root',
      group   => 'root',
      mode    => '0444',
  }

  nrpe::monitor_service { 'raid_md':
    description    => 'MD RAID',
    nrpe_command   => "${raid::check_raid} md",
    event_handler  => "raid_handler!md!${::site}",
    notes_url      => 'https://wikitech.wikimedia.org/wiki/Dc-operations/Hardware_Troubleshooting_Runbook#Hardware_Raid_Information_Gathering',
    check_interval => 10,
  }

  nrpe::check { 'get_raid_status_md':
    command => 'cat /proc/mdstat',
  }

}