Ceph/Virsh token: Enclose also exported ressources into ceph::admin::key
Close GH-97
This commit is contained in:
parent
6fa538c4af
commit
c98f003cfd
@ -27,8 +27,8 @@ class cloud::storage::rbd::pools(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
if $setup_pools {
|
if $setup_pools {
|
||||||
|
|
||||||
if !empty($::ceph_admin_key) {
|
if !empty($::ceph_admin_key) {
|
||||||
|
|
||||||
# ceph osd pool create poolname 128 128
|
# ceph osd pool create poolname 128 128
|
||||||
exec { 'create_glance_images_pool':
|
exec { 'create_glance_images_pool':
|
||||||
command => "rados mkpool ${glance_pool} ${pool_default_pg_num} ${pool_default_pgp_num}",
|
command => "rados mkpool ${glance_pool} ${pool_default_pg_num} ${pool_default_pgp_num}",
|
||||||
@ -53,18 +53,15 @@ class cloud::storage::rbd::pools(
|
|||||||
unless => "ceph auth list 2> /dev/null | egrep -sq '^client.${cinder_user}$'",
|
unless => "ceph auth list 2> /dev/null | egrep -sq '^client.${cinder_user}$'",
|
||||||
require => Exec['create_cinder_volumes_pool'];
|
require => Exec['create_cinder_volumes_pool'];
|
||||||
}
|
}
|
||||||
} # !empty($::ceph_admin_key)
|
|
||||||
|
|
||||||
# exec { "create cinder backup pool":
|
#exec { "create cinder backup pool":
|
||||||
# # TODO: point PG num with a cluster variable + keyring
|
#TODO: point PG num with a cluster variable + keyring
|
||||||
# command => "/usr/bin/ceph osd pool create ${::cinder_backup_pool} 128 128",
|
# command => "/usr/bin/ceph osd pool create ${::cinder_backup_pool} 128 128",
|
||||||
# command => "\
|
# command => "ceph auth get-or-create client.${::cinder_backup_user} mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=${::cinder_backup_pool}'",
|
||||||
#ceph auth get-or-create client.${::cinder_backup_user} mon 'allow r' \
|
|
||||||
#osd 'allow class-read object_prefix rbd_children, allow rwx pool=${::cinder_backup_pool}'",
|
|
||||||
# unless => "/usr/bin/rados lspools | grep -sq ${::cinder_backup_pool}",
|
# unless => "/usr/bin/rados lspools | grep -sq ${::cinder_backup_pool}",
|
||||||
# unless => "ceph auth list | egrep '^${::cinder_backup_pool}$'",
|
# unless => "ceph auth list | egrep '^${::cinder_backup_pool}$'",
|
||||||
# require => Ceph::Key['admin'],
|
# require => Ceph::Key['admin'],
|
||||||
# }
|
#}
|
||||||
|
|
||||||
@@file { '/etc/ceph/secret.xml':
|
@@file { '/etc/ceph/secret.xml':
|
||||||
content => template('cloud/storage/ceph/secret-compute.xml.erb'),
|
content => template('cloud/storage/ceph/secret-compute.xml.erb'),
|
||||||
@ -85,5 +82,6 @@ class cloud::storage::rbd::pools(
|
|||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} # !empty($::ceph_admin_key)
|
||||||
} # if setup pools
|
} # if setup pools
|
||||||
} # class
|
} # class
|
||||||
|
Loading…
x
Reference in New Issue
Block a user