Remove logic for old operating systems
CentOS <= 8 or Fedora < 22 are too old. Change-Id: I820f134688e345a85ebd09ad6adcea2f6c79da12
This commit is contained in:
parent
0c13846794
commit
2281369777
|
@ -3,7 +3,7 @@
|
|||
|
||||
Facter.add(:mariadb_provides_galera) do
|
||||
setcode do
|
||||
if Facter.value(:operatingsystem) == 'Fedora' and Facter.value(:operatingsystemmajrelease).to_i > 22
|
||||
if Facter.value(:operatingsystem) == 'Fedora'
|
||||
command = 'dnf repoquery --whatprovides mariadb-server-galera'
|
||||
else
|
||||
command = 'repoquery --whatprovides mariadb-server-galera'
|
||||
|
|
|
@ -14,56 +14,38 @@ class packstack::cinder::backend::lvm ()
|
|||
volume_name => $cinder_volume_name,
|
||||
}
|
||||
|
||||
# Add loop device on boot
|
||||
$el_releases = ['RedHat', 'CentOS', 'Scientific']
|
||||
if $::operatingsystem in $el_releases and (versioncmp($::operatingsystemmajrelease, '7') < 0) {
|
||||
file { 'openstack-losetup':
|
||||
path => '/usr/lib/systemd/system/openstack-losetup.service',
|
||||
before => Service['openstack-losetup'],
|
||||
notify => Exec['reload systemd files for cinder-volume'],
|
||||
content => "[Unit]
|
||||
Description=Setup cinder-volume loop device
|
||||
DefaultDependencies=false
|
||||
Before=openstack-cinder-volume.service
|
||||
After=local-fs.target
|
||||
|
||||
file_line{ 'rc.local_losetup_cinder_volume':
|
||||
path => '/etc/rc.d/rc.local',
|
||||
match => "^.*/var/lib/cinder/${cinder_volume_name}.*$",
|
||||
line => "losetup -f /var/lib/cinder/${cinder_volume_name} && service openstack-cinder-volume restart",
|
||||
}
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/sh -c \'/usr/sbin/losetup -j /var/lib/cinder/${cinder_volume_name} | /usr/bin/grep /var/lib/cinder/${cinder_volume_name} || /usr/sbin/losetup -f /var/lib/cinder/${cinder_volume_name}\'
|
||||
ExecStop=/usr/bin/sh -c \'/usr/sbin/losetup -j /var/lib/cinder/${cinder_volume_name} | /usr/bin/cut -d : -f 1 | /usr/bin/xargs /usr/sbin/losetup -d\'
|
||||
TimeoutSec=60
|
||||
RemainAfterExit=yes
|
||||
|
||||
file { '/etc/rc.d/rc.local':
|
||||
mode => '0755',
|
||||
}
|
||||
[Install]
|
||||
RequiredBy=openstack-cinder-volume.service",
|
||||
}
|
||||
|
||||
} else {
|
||||
exec { 'reload systemd files for cinder-volume':
|
||||
command => '/usr/bin/systemctl daemon-reload',
|
||||
refreshonly => true,
|
||||
before => Service['openstack-losetup'],
|
||||
}
|
||||
|
||||
file { 'openstack-losetup':
|
||||
path => '/usr/lib/systemd/system/openstack-losetup.service',
|
||||
before => Service['openstack-losetup'],
|
||||
notify => Exec['reload systemd files for cinder-volume'],
|
||||
content => "[Unit]
|
||||
Description=Setup cinder-volume loop device
|
||||
DefaultDependencies=false
|
||||
Before=openstack-cinder-volume.service
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/sh -c \'/usr/sbin/losetup -j /var/lib/cinder/${cinder_volume_name} | /usr/bin/grep /var/lib/cinder/${cinder_volume_name} || /usr/sbin/losetup -f /var/lib/cinder/${cinder_volume_name}\'
|
||||
ExecStop=/usr/bin/sh -c \'/usr/sbin/losetup -j /var/lib/cinder/${cinder_volume_name} | /usr/bin/cut -d : -f 1 | /usr/bin/xargs /usr/sbin/losetup -d\'
|
||||
TimeoutSec=60
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
RequiredBy=openstack-cinder-volume.service",
|
||||
}
|
||||
|
||||
exec { 'reload systemd files for cinder-volume':
|
||||
command => '/usr/bin/systemctl daemon-reload',
|
||||
refreshonly => true,
|
||||
before => Service['openstack-losetup'],
|
||||
}
|
||||
|
||||
service { 'openstack-losetup':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => Class['cinder::setup_test_volume'],
|
||||
}
|
||||
|
||||
}
|
||||
service { 'openstack-losetup':
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => Class['cinder::setup_test_volume'],
|
||||
}
|
||||
}
|
||||
else {
|
||||
ensure_packages(['lvm2'], {'ensure' => 'present'})
|
||||
|
|
|
@ -101,14 +101,10 @@ class packstack::provision::tempest ()
|
|||
$neutron_api_extensions = undef
|
||||
}
|
||||
|
||||
if versioncmp($::operatingsystemmajrelease, '9') >= 0 {
|
||||
# NOTE(tkajinam): The latest openssl in c9s repo doesn't accept SHA1 by
|
||||
# default, which is causing ssh with rsa keys to fail.
|
||||
# See bug 1962507 for details.
|
||||
$ssh_key_type = 'ecdsa'
|
||||
} else {
|
||||
$ssh_key_type = 'rsa'
|
||||
}
|
||||
# NOTE(tkajinam): The latest openssl in c9s repo doesn't accept SHA1 by
|
||||
# default, which is causing ssh with rsa keys to fail.
|
||||
# See bug 1962507 for details.
|
||||
$ssh_key_type = 'ecdsa'
|
||||
|
||||
class { 'tempest':
|
||||
admin_domain_name => $admin_domain_name,
|
||||
|
|
|
@ -7,17 +7,9 @@ class packstack::swift::ringbuilder ()
|
|||
require => Class['swift'],
|
||||
}
|
||||
|
||||
if ($::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '9') == 0) {
|
||||
# sets up an rsync db that can be used to sync the ring DB
|
||||
class { 'swift::ringserver':
|
||||
local_net_ip => lookup('CONFIG_STORAGE_HOST_URL'),
|
||||
rsync_use_xinetd => false,
|
||||
}
|
||||
} else {
|
||||
# sets up an rsync db that can be used to sync the ring DB
|
||||
class { 'swift::ringserver':
|
||||
local_net_ip => lookup('CONFIG_STORAGE_HOST_URL'),
|
||||
}
|
||||
# sets up an rsync db that can be used to sync the ring DB
|
||||
class { 'swift::ringserver':
|
||||
local_net_ip => lookup('CONFIG_STORAGE_HOST_URL'),
|
||||
}
|
||||
|
||||
if str2bool($::selinux) {
|
||||
|
|
Loading…
Reference in New Issue