Merge "Use correct environment for Cinder using Kestone v3 API"
This commit is contained in:
@@ -23,6 +23,11 @@ class { '::cinder::volume': }
|
||||
|
||||
class { '::cinder::client': }
|
||||
|
||||
$cinder_keystone_admin_username = hiera('CONFIG_KEYSTONE_ADMIN_USERNAME')
|
||||
$cinder_keystone_admin_password = hiera('CONFIG_KEYSTONE_ADMIN_PW')
|
||||
$cinder_keystone_auth_url = hiera('CONFIG_KEYSTONE_PUBLIC_URL')
|
||||
$cinder_keystone_api = hiera('CONFIG_KEYSTONE_API_VERSION')
|
||||
|
||||
# Cinder::Type requires keystone credentials
|
||||
Cinder::Type {
|
||||
os_password => hiera('CONFIG_CINDER_KS_PW'),
|
||||
|
||||
@@ -8,6 +8,21 @@ cinder::backend::glusterfs { 'gluster':
|
||||
glusterfs_shares_config => '/etc/cinder/glusterfs_shares.conf',
|
||||
}
|
||||
|
||||
# TO-DO: Remove this workaround as soon as bz#1239040 will be resolved
|
||||
if $cinder_keystone_api == 'v3' {
|
||||
Exec <| title == 'cinder type-create glusterfs' or title == 'cinder type-key glusterfs set volume_backend_name=gluster' |> {
|
||||
environment => [
|
||||
"OS_USERNAME=${cinder_keystone_admin_username}",
|
||||
"OS_PASSWORD=${cinder_keystone_admin_password}",
|
||||
"OS_AUTH_URL=${cinder_keystone_auth_url}",
|
||||
"OS_IDENTITY_API_VERSION=${cinder_keystone_api}",
|
||||
"OS_PROJECT_NAME=admin",
|
||||
"OS_USER_DOMAIN_NAME=Default",
|
||||
"OS_PROJECT_DOMAIN_NAME=Default",
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
cinder::type { 'glusterfs':
|
||||
set_key => 'volume_backend_name',
|
||||
set_value => 'gluster',
|
||||
|
||||
@@ -85,6 +85,20 @@ cinder::backend::iscsi { 'lvm':
|
||||
}
|
||||
|
||||
|
||||
# TO-DO: Remove this workaround as soon as bz#1239040 will be resolved
|
||||
if $cinder_keystone_api == 'v3' {
|
||||
Exec <| title == 'cinder type-create iscsi' or title == 'cinder type-key iscsi set volume_backend_name=lvm' |> {
|
||||
environment => [
|
||||
"OS_USERNAME=${cinder_keystone_admin_username}",
|
||||
"OS_PASSWORD=${cinder_keystone_admin_password}",
|
||||
"OS_AUTH_URL=${cinder_keystone_auth_url}",
|
||||
"OS_IDENTITY_API_VERSION=${cinder_keystone_api}",
|
||||
"OS_PROJECT_NAME=admin",
|
||||
"OS_USER_DOMAIN_NAME=Default",
|
||||
"OS_PROJECT_DOMAIN_NAME=Default",
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
cinder::type { 'iscsi':
|
||||
set_key => 'volume_backend_name',
|
||||
|
||||
@@ -125,6 +125,21 @@ elsif $netapp_storage_family == 'eseries' {
|
||||
package { 'iscsi-initiator-utils': ensure => present }
|
||||
}
|
||||
|
||||
# TO-DO: Remove this workaround as soon as bz#1239040 will be resolved
|
||||
if $cinder_keystone_api == 'v3' {
|
||||
Exec <| title == "cinder type-create ${netapp_backend_name}" or title == "cinder type-key ${netapp_backend_name} set volume_backend_name=${netapp_backend_name}" |> {
|
||||
environment => [
|
||||
"OS_USERNAME=${cinder_keystone_admin_username}",
|
||||
"OS_PASSWORD=${cinder_keystone_admin_password}",
|
||||
"OS_AUTH_URL=${cinder_keystone_auth_url}",
|
||||
"OS_IDENTITY_API_VERSION=${cinder_keystone_api}",
|
||||
"OS_PROJECT_NAME=admin",
|
||||
"OS_USER_DOMAIN_NAME=Default",
|
||||
"OS_PROJECT_DOMAIN_NAME=Default",
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
cinder::type { $netapp_backend_name:
|
||||
set_key => 'volume_backend_name',
|
||||
set_value => $netapp_backend_name,
|
||||
|
||||
@@ -6,6 +6,21 @@ cinder::backend::nfs { 'nfs':
|
||||
nfs_shares_config => '/etc/cinder/nfs_shares.conf',
|
||||
}
|
||||
|
||||
# TO-DO: Remove this workaround as soon as bz#1239040 will be resolved
|
||||
if $cinder_keystone_api == 'v3' {
|
||||
Exec <| title == 'cinder type-create nfs' or title == 'cinder type-key nfs set volume_backend_name=nfs' |> {
|
||||
environment => [
|
||||
"OS_USERNAME=${cinder_keystone_admin_username}",
|
||||
"OS_PASSWORD=${cinder_keystone_admin_password}",
|
||||
"OS_AUTH_URL=${cinder_keystone_auth_url}",
|
||||
"OS_IDENTITY_API_VERSION=${cinder_keystone_api}",
|
||||
"OS_PROJECT_NAME=admin",
|
||||
"OS_USER_DOMAIN_NAME=Default",
|
||||
"OS_PROJECT_DOMAIN_NAME=Default",
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
cinder::type { 'nfs':
|
||||
set_key => 'volume_backend_name',
|
||||
set_value => 'nfs',
|
||||
|
||||
@@ -4,6 +4,21 @@ cinder::backend::vmdk { 'vmdk':
|
||||
host_password => hiera('CONFIG_VCENTER_PASSWORD'),
|
||||
}
|
||||
|
||||
# TO-DO: Remove this workaround as soon as bz#1239040 will be resolved
|
||||
if $cinder_keystone_api == 'v3' {
|
||||
Exec <| title == 'cinder type-create vmdk' or title == 'cinder type-key vmdk set volume_backend_name=vmdk' |> {
|
||||
environment => [
|
||||
"OS_USERNAME=${cinder_keystone_admin_username}",
|
||||
"OS_PASSWORD=${cinder_keystone_admin_password}",
|
||||
"OS_AUTH_URL=${cinder_keystone_auth_url}",
|
||||
"OS_IDENTITY_API_VERSION=${cinder_keystone_api}",
|
||||
"OS_PROJECT_NAME=admin",
|
||||
"OS_USER_DOMAIN_NAME=Default",
|
||||
"OS_PROJECT_DOMAIN_NAME=Default",
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
cinder::type { 'vmdk':
|
||||
set_key => 'volume_backend_name',
|
||||
set_value => 'vmdk',
|
||||
|
||||
Reference in New Issue
Block a user