Puppet Class: openstack::nova::compute::service::bobcat::bookworm

Defined in:
modules/openstack/manifests/nova/compute/service/bobcat/bookworm.pp

Overview



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
55
56
57
# File 'modules/openstack/manifests/nova/compute/service/bobcat/bookworm.pp', line 3

class openstack::nova::compute::service::bobcat::bookworm() {
    require openstack::serverpackages::bobcat::bookworm

    # the libvirt-daemon-system install may trigger an update-initramfs run.
    # under some circumstances, the busybox package may not be installed, thus
    # failing the complete stack installation, because initramfs requires it,
    # but is declared as Recommends and not Depends
    package { 'busybox':
        ensure => 'present',
    }

    ensure_packages(['libvirt-clients'])

    $packages = [
        'libvirt-daemon-system',
        'python3-libvirt',
        'qemu-system',
        'spice-html5',
        'websockify',
        'dnsmasq-base',
        'qemu-utils',
        'nova-compute',
        'nova-compute-kvm',
        'genisoimage',
    ]

    package { $packages:
        ensure  => 'present',
        require => Package['busybox'],
    }

    # The only reliable order to get this working is:
    #  - stop libvirtd
    #  - start libvirtd-tls.socket
    #  - start libvirtd
    service { 'libvirtd-tls.socket':
        ensure  => 'running',
        enable  => true,
        require => Package[libvirt-daemon-system],
        before  => Service['libvirtd'],
        start   => '/usr/bin/systemctl stop libvirtd && /usr/bin/systemctl start libvirtd-tls.socket',
    }

    service { 'libvirtd-tcp.socket':
        ensure  => 'stopped',
        require => Package[libvirt-daemon-system],
        before  => Service['libvirtd-tls.socket'],
    }

    service { 'libvirtd':
        ensure  => 'running',
        enable  => true,
        require => Package[libvirt-daemon-system],
    }
}