Skip to content
Snippets Groups Projects
Commit a6269494 authored by James Page's avatar James Page
Browse files

Ensure ceph keyring has correct perms

parent bff97e86
No related branches found
No related tags found
No related merge requests found
......@@ -74,8 +74,10 @@ def storage_ceph_connected(ceph):
@reactive.when('storage-ceph.available')
def configure_ceph(ceph):
ceph_helper.create_keyring(hookenv.service_name(),
ceph.key())
ceph_helper.ensure_ceph_keyring(service=hookenv.service_name(),
key=ceph.key(),
user='gnocchi',
group='gnocchi')
@reactive.when_not('storage-ceph.connected')
......
......@@ -109,9 +109,11 @@ class TestHandlers(test_utils.PatchHelper):
mock_ceph.key.return_value = 'testkey'
mock_hookenv.service_name.return_value = 'gnocchi'
handlers.configure_ceph(mock_ceph)
mock_ceph_helper.create_keyring.assert_called_once_with(
'gnocchi',
'testkey',
mock_ceph_helper.ensure_ceph_keyring.assert_called_once_with(
service='gnocchi',
key='testkey',
user='gnocchi',
group='gnocchi'
)
mock_ceph.key.assert_called_once_with()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment