X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fganeti2%2Fmanifests%2Finit.pp;h=20236b1e4e7c0f1f6497cb34f71d03c01bf02891;hb=9d0250cb427297aaf7ce598f42373398fbc5085c;hp=cf658fc5885f72714682c0654b6155802ca15e39;hpb=a68ac2a388955f929b49474adfc31c2bf985258b;p=mirror%2Fdsa-puppet.git diff --git a/modules/ganeti2/manifests/init.pp b/modules/ganeti2/manifests/init.pp index cf658fc58..20236b1e4 100644 --- a/modules/ganeti2/manifests/init.pp +++ b/modules/ganeti2/manifests/init.pp @@ -17,68 +17,60 @@ class ganeti2 { ensure => installed } - package { 'ganeti-instance-debootstrap': - ensure => installed - } + base::linux_module { 'tun': } - package { 'ganeti-htools': - ensure => installed + file { '/etc/cron.hourly/puppet-cleanup-watcher-pause-file': + source => 'puppet:///modules/ganeti2/cleanup-watcher-pause-file', + mode => '0555', } - if $drbd { - package { 'drbd8-utils': - ensure => installed + if $::debarchitecture == 'arm64' { + file { '/usr/local/bin/qemu-system-aarch64-wrapper': + source => 'puppet:///modules/ganeti2/qemu-system-aarch64-wrapper', + mode => '0555', } } - - site::linux_module { 'tun': } - - file { - '/etc/ganeti/instance-debootstrap/variants.list': - content => template('ganeti2/instance-debootstrap/variants.list.erb'), - require => Package['ganeti-instance-debootstrap'], - ; - '/etc/ganeti/instance-debootstrap/variants/dsa.conf': - content => template('ganeti2/instance-debootstrap/variants/dsa.conf.erb'), - require => Package['ganeti-instance-debootstrap'], - ; - '/etc/ganeti/instance-debootstrap/variants/dsa-wheezy.conf': - content => template('ganeti2/instance-debootstrap/variants/dsa-wheezy.conf.erb'), - require => Package['ganeti-instance-debootstrap'], - ; - '/etc/ganeti/instance-debootstrap/hooks/00-dsa-configure-networking': - content => template('ganeti2/instance-debootstrap/hooks/00-dsa-configure-networking.erb'), - require => Package['ganeti-instance-debootstrap'], - mode => '0555', - ; - '/etc/ganeti/instance-debootstrap/hooks/10-dsa-install-extra-packages': - content => template('ganeti2/instance-debootstrap/hooks/10-dsa-install-extra-packages.erb'), - require => Package['ganeti-instance-debootstrap'], - mode => '0555', - ; - '/etc/ganeti/instance-debootstrap/hooks/20-dsa-install-bootloader': - content => template('ganeti2/instance-debootstrap/hooks/20-dsa-install-bootloader.erb'), - require => Package['ganeti-instance-debootstrap'], - mode => '0555', - ; - '/etc/ganeti/instance-debootstrap/hooks/30-dsa-install-ssh-keys': - content => template('ganeti2/instance-debootstrap/hooks/30-dsa-install-ssh-keys.erb'), - require => Package['ganeti-instance-debootstrap'], - mode => '0555', - ; - '/etc/ganeti/instance-debootstrap/hooks/40-dsa-setup-swapfile': - content => template('ganeti2/instance-debootstrap/hooks/40-dsa-setup-swapfile.erb'), - require => Package['ganeti-instance-debootstrap'], - mode => '0555', - ; - '/etc/ganeti/instance-debootstrap/hooks/clear-root-password': - require => Package['ganeti-instance-debootstrap'], - mode => '0444', - ; - '/etc/ganeti/instance-debootstrap/hooks/xen-hvc0': - require => Package['ganeti-instance-debootstrap'], - mode => '0444', - ; + if $::cluster == 'ganeti.bm.debian.org' { + file { '/usr/local/sbin/crazy-multipath-restart': + source => 'puppet:///modules/ganeti2/crazy-multipath-restart', + mode => '0555', + } + file { '/etc/cron.d/puppet-crazy-multipath-restart': ensure => absent, } + concat::fragment { 'puppet-crontab--multipath-restart': + target => '/etc/cron.d/puppet-crontab', + content => @("EOF"), + */15 * * * * root /usr/local/sbin/crazy-multipath-restart + | EOF + } + } + file { '/usr/local/sbin/ganeti-reboot-cluster': + source => 'puppet:///modules/ganeti2/ganeti-reboot-cluster', + mode => '0555', } + package { ['python-dbus', 'systemd-container']: ensure => installed } + file { '/usr/local/sbin/ganeti-machined-register-instances': + source => 'puppet:///modules/ganeti2/ganeti-machined-register-instances', + mode => '0555', + } + file { [ + '/etc/ganeti/hooks', + '/etc/ganeti/hooks/instance-reboot-post.d', + '/etc/ganeti/hooks/instance-migrate-post.d', + '/etc/ganeti/hooks/instance-start-post.d', + '/etc/ganeti/hooks/instance-failover-post.d', + '/etc/ganeti/hooks/instance-add-post.d', + ]: + ensure => directory, + } + file { [ + '/etc/ganeti/hooks/instance-reboot-post.d/00-ganeti-machined-register-instances', + '/etc/ganeti/hooks/instance-migrate-post.d/00-ganeti-machined-register-instances', + '/etc/ganeti/hooks/instance-start-post.d/00-ganeti-machined-register-instances', + '/etc/ganeti/hooks/instance-failover-post.d/00-ganeti-machined-register-instances', + '/etc/ganeti/hooks/instance-add-post.d/00-ganeti-machined-register-instances', + ]: + ensure => link, + target => '/usr/local/sbin/ganeti-machined-register-instances', + } }