Puppet Class: openstack::cinder::service

Defined in:
modules/openstack/manifests/cinder/service.pp

Overview

Parameters:

  • active (Any)
  • version (Any)
  • api_bind_port (Stdlib::Port)
  • cinder_backup_volumes (Hash)


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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'modules/openstack/manifests/cinder/service.pp', line 3

class openstack::cinder::service(
    $active,
    $version,
    Stdlib::Port $api_bind_port,
    Hash $cinder_backup_volumes,
) {
    class { "openstack::cinder::service::${version}":
        api_bind_port           => $api_bind_port,
    }
    # config should have been declared via a profile, with proper hiera, and is
    # here only for ordering/dependency purposes:
    require "openstack::cinder::config::${version}"

    service { 'cinder-scheduler':
        ensure    => $active,
        require   => Package['cinder-scheduler'],
        subscribe => Class["openstack::cinder::config::${version}"],
    }

    service { 'cinder-api':
        ensure    => $active,
        require   => Package['cinder-api'],
        subscribe => Class["openstack::cinder::config::${version}"],
    }

    rsyslog::conf { 'cinder':
        source   => 'puppet:///modules/openstack/cinder/cinder.rsyslog.conf',
        priority => 20,
    }

    if $cinder_backup_volumes != {} {
        file { '/etc/wmcs-cinder-backup-manager.yaml':
            content   => $cinder_backup_volumes.to_yaml,
            owner     => 'cinder',
            group     => 'cinder',
            mode      => '0440',
            show_diff => false,
        }

        systemd::timer::job { 'backup_cinder_volumes':
            description     => 'Backup select cinder volumes using wmcs-cinder-backup-manager.py',
            command         => '/usr/local/sbin/wmcs-cinder-backup-manager',
            user            => 'root',
            logging_enabled => true,
            logfile_name    => 'wmcs-cinder-backup-manager.log',
            interval        => {
                'start'    => 'OnCalendar',
                'interval' => 'Mon,Wed,Fri *-*-* 10:30:00', # The closer to every two days I could get
            },
        }
    }
}