Merge "Fix multiple backends with some drivers"

This commit is contained in:
Zuul 2023-03-19 18:34:54 +00:00 committed by Gerrit Code Review
commit dad08c7df5
5 changed files with 16 additions and 15 deletions

View File

@ -70,12 +70,10 @@ define cinder::backend::iscsi (
# NOTE(mnaser): Cinder requires /usr/sbin/thin_check to create volumes which # NOTE(mnaser): Cinder requires /usr/sbin/thin_check to create volumes which
# does not get installed with Cinder (see LP#1615134). # does not get installed with Cinder (see LP#1615134).
if $facts['os']['family'] == 'Debian' { if $facts['os']['family'] == 'Debian' {
if ! defined(Package['thin-provisioning-tools']) { ensure_packages( 'thin-provisioning-tools', {
package { 'thin-provisioning-tools': ensure => present,
ensure => present, tag => 'cinder-support-package',
tag => 'cinder-support-package', })
}
}
} }
cinder_config { cinder_config {

View File

@ -95,16 +95,16 @@ define cinder::backend::nvmeof (
"${name}/target_secondary_ip_addresses": value => join(any2array($target_secondary_ip_addresses), ','); "${name}/target_secondary_ip_addresses": value => join(any2array($target_secondary_ip_addresses), ',');
} }
package { 'nvmetcli': ensure_packages ( 'nvmetcli', {
ensure => present, ensure => present,
name => 'nvmetcli', name => 'nvmetcli',
tag => 'cinder-support-package', tag => 'cinder-support-package',
} })
package { 'nvme-cli': ensure_packages ( 'nvme-cli', {
ensure => present, ensure => present,
name => 'nvme-cli', name => 'nvme-cli',
tag => 'cinder-support-package', tag => 'cinder-support-package',
} })
} }

View File

@ -109,10 +109,10 @@ define cinder::backend::vstorage (
} }
if $manage_package { if $manage_package {
package { 'vstorage-client': ensure_packages( 'vstorage-client', {
ensure => present, ensure => present,
tag => 'cinder-support-package', tag => 'cinder-support-package',
} })
} }
$mount_opts = ['-u', $mount_user_real, '-g', $mount_group, '-m', $mount_permissions] $mount_opts = ['-u', $mount_user_real, '-g', $mount_group, '-m', $mount_permissions]

View File

@ -34,13 +34,13 @@ describe 'cinder::backend::nvmeof' do
it { is_expected.to contain_package('nvmetcli').with( it { is_expected.to contain_package('nvmetcli').with(
:name => 'nvmetcli', :name => 'nvmetcli',
:ensure => 'present', :ensure => 'installed',
:tag => 'cinder-support-package', :tag => 'cinder-support-package',
)} )}
it { is_expected.to contain_package('nvme-cli').with( it { is_expected.to contain_package('nvme-cli').with(
:name => 'nvme-cli', :name => 'nvme-cli',
:ensure => 'present', :ensure => 'installed',
:tag => 'cinder-support-package', :tag => 'cinder-support-package',
)} )}
end end

View File

@ -38,7 +38,10 @@ describe 'cinder::backend::vstorage' do
:value => 'cinder.volume.drivers.vzstorage.VZStorageDriver' :value => 'cinder.volume.drivers.vzstorage.VZStorageDriver'
)} )}
it { is_expected.to contain_package('vstorage-client').with_ensure('present') } it { is_expected.to contain_package('vstorage-client').with(
:ensure => 'installed',
:tag => 'cinder-support-package',
) }
it { is_expected.to contain_file('/etc/cinder/vstorage_shares.conf').with( it { is_expected.to contain_file('/etc/cinder/vstorage_shares.conf').with(
:content => "stor1:passw0rd [\"-u\", \"cinder\", \"-g\", \"root\", \"-m\", \"0770\"]" :content => "stor1:passw0rd [\"-u\", \"cinder\", \"-g\", \"root\", \"-m\", \"0770\"]"