ceph clients can relate through the proxy

This commit is contained in:
Chris MacNaughton 2016-06-15 13:44:40 -04:00
parent 1671d8b0e9
commit cbf55d6dfd
7 changed files with 17 additions and 12 deletions

View File

@ -18,11 +18,11 @@ options:
default: default:
description: | description: |
Admin cephx key for existing Ceph cluster Admin cephx key for existing Ceph cluster
mon-key: # mon-key:
type: string # type: string
default: # default:
description: | # description: |
Monitor cephx key # Monitor cephx key
source: source:
type: string type: string
default: default:

View File

@ -372,7 +372,7 @@ def get_named_key(name, caps=None):
"-u", "-u",
ceph_user(), ceph_user(),
'ceph', 'ceph',
'--name', 'mon.', '--name', 'client.admin',
'--keyring', '--keyring',
'/var/lib/ceph/mon/ceph-{}/keyring'.format( '/var/lib/ceph/mon/ceph-{}/keyring'.format(
get_unit_hostname() get_unit_hostname()

View File

@ -115,11 +115,11 @@ def emit_cephconf():
charm_ceph_conf, 100) charm_ceph_conf, 100)
keyring = 'ceph.client.admin.keyring' keyring = 'ceph.client.admin.keyring'
keyring_path = '/etc/ceph/' + keyring keyring_path = '/etc/ceph/' + keyring
render(keyring, keyring_path, {'admin_key': config('admin-key')}, perms=0o600) render(keyring, keyring_path, {'admin_key': config('admin-key')}, owner=ceph.ceph_user(), perms=0o600)
keyring = 'keyring' keyring = 'keyring'
keyring_path = '/var/lib/ceph/mon/ceph-' + get_unit_hostname()+ '/' + keyring keyring_path = '/var/lib/ceph/mon/ceph-' + get_unit_hostname()+ '/' + keyring
render('mon.keyring', keyring_path, {'mon_key': config('mon-key')}, perms=0o600) render('mon.keyring', keyring_path, {'admin_key': config('admin-key')}, owner=ceph.ceph_user(), perms=0o600)
notify_radosgws() notify_radosgws()
notify_client() notify_client()

View File

@ -9,6 +9,9 @@ tags:
- storage - storage
- file-servers - file-servers
- misc - misc
extra-bindings:
public:
cluster:
provides: provides:
client: client:
interface: ceph-client interface: ceph-client

View File

@ -10,3 +10,4 @@ Jinja2>=2.6 # BSD License (3 clause)
six>=1.9.0 six>=1.9.0
dnspython>=1.12.0 dnspython>=1.12.0
psutil>=1.1.1,<2.0.0 psutil>=1.1.1,<2.0.0
charm-tools>=2.0.0

View File

@ -1,2 +1,3 @@
[client.admin] [client.admin]
key = {{admin_key}} key = {{admin_key}}

View File

@ -1,3 +1,3 @@
[mon.] [client.admin]
key = {{mon_key}} key = {{admin_key}}
caps mon = "allow *"