Ceph: several fixes

Fix duplicate resources.

Closes bug: #154
This commit is contained in:
Sébastien Han
2014-02-11 14:14:54 +01:00
parent 6662cad9da
commit bda41065db
2 changed files with 4 additions and 26 deletions

View File

@@ -54,19 +54,13 @@ class cloud::storage::rbd::pools(
require => Exec['create_cinder_volumes_pool']; require => Exec['create_cinder_volumes_pool'];
} }
concat::fragment { 'ceph-clients-os':
target => '/etc/ceph/ceph.conf',
order => '95',
content => template('cloud/storage/ceph/ceph-client.conf.erb')
}
if $::ceph_keyring_glance { if $::ceph_keyring_glance {
# NOTE(fc): Puppet needs to run a second time to enter this # NOTE(fc): Puppet needs to run a second time to enter this
ceph::key { $glance_user: ceph::key { $glance_user:
secret => $::ceph_keyring_glance, secret => $::ceph_keyring_glance,
keyring_path => "/etc/ceph/ceph.client.${glance_user}.keyring" keyring_path => "/etc/ceph/ceph.client.${glance_user}.keyring"
} -> } ->
file { '/etc/ceph/ceph.client.glance.keyring': file { "/etc/ceph/ceph.client.${glance_user}.keyring":
owner => 'glance', owner => 'glance',
group => 'glance', group => 'glance',
mode => '0400' mode => '0400'
@@ -79,7 +73,7 @@ class cloud::storage::rbd::pools(
secret => $::ceph_keyring_cinder, secret => $::ceph_keyring_cinder,
keyring_path => "/etc/ceph/ceph.client.${cinder_user}.keyring" keyring_path => "/etc/ceph/ceph.client.${cinder_user}.keyring"
} -> } ->
file { '/etc/ceph/ceph.client.cinder.keyring': file { "/etc/ceph/ceph.client.${cinder_user}.keyring":
owner => 'cinder', owner => 'cinder',
group => 'cinder', group => 'cinder',
mode => '0400' mode => '0400'
@@ -93,22 +87,6 @@ class cloud::storage::rbd::pools(
content => template('cloud/storage/ceph/ceph-client.conf.erb') content => template('cloud/storage/ceph/ceph-client.conf.erb')
} }
if $::ceph_keyring_glance {
# NOTE(fc): Puppet needs to run a second time to enter this
@@ceph::key { $glance_user:
secret => $::ceph_keyring_glance,
keyring_path => "/etc/ceph/ceph.client.${glance_user}.keyring"
}
}
if $::ceph_keyring_cinder {
# NOTE(fc): Puppet needs to run a second time to enter this
@@ceph::key { $cinder_user:
secret => $::ceph_keyring_cinder,
keyring_path => "/etc/ceph/ceph.client.${cinder_user}.keyring"
}
}
#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",

View File

@@ -1,8 +1,8 @@
<% if @clients %> <% if @clients %>
<% @clients.each do |client| %> <% @clients.each do |client| %>
[client.<%= @client %>] [client.<%= client %>]
keyring = /etc/ceph/ceph.client.<%= @client %>.keyring keyring = /etc/ceph/ceph.client.<%= client %>.keyring
<% end %> <% end %>
<% end %> <% end %>