Skip to content

Commit

Permalink
test proper keyring creation
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwiedemann committed Oct 1, 2018
1 parent 0ddc433 commit 32c25e2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions chef/cookbooks/ceph/recipes/mon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@


unless File.exist?("/var/lib/ceph/mgr/ceph-#{mon_name}/done")
keyring = "#{Chef::Config[:file_cache_path]}/#{cluster}-#{mon_name}.mgr.keyring"
keyring = "/var/lib/ceph/mgr/#{cluster}-#{mon_name}/keyring"
execute "create mgr keyring" do
command "ceph-authtool '#{keyring}' --create-keyring --name=mgr. --add-key='#{node["ceph"]["monitor-secret"]}' --cap mgr 'allow *'"
not_if { node["ceph"]["monitor-secret"].empty? }
command "ceph auth get-or-create mgr.#{mon_name} \
mon 'allow profile mgr' osd 'allow *' mds 'allow *' \
-o #{keyring} && \
chown ceph.ceph #{keyring}"
not_if { File.exist?(keyring) }
end
ruby_block "finalise" do
block do
Expand Down

0 comments on commit 32c25e2

Please sign in to comment.