diff --git a/hooks/cinder_hooks.py b/hooks/cinder_hooks.py index 29f0b7c..f87a48e 100755 --- a/hooks/cinder_hooks.py +++ b/hooks/cinder_hooks.py @@ -2,6 +2,7 @@ import os import sys +import json from cinder_utils import ( ensure_ceph_pool, @@ -90,8 +91,10 @@ def storage_backend(rel_id=None): if 'ceph' not in CONFIGS.complete_contexts(): log('ceph relation incomplete. Peer not ready?') else: - relation_set(relation_id=rel_id, - subordinate_configuration=CephSubordinateContext()) + relation_set( + relation_id=rel_id, + subordinate_configuration=json.dumps(CephSubordinateContext()()) + ) if __name__ == '__main__': diff --git a/metadata.yaml b/metadata.yaml index 60f22b2..f5d044c 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -7,10 +7,14 @@ description: | This charm provides a Ceph storage backend for Cinder categories: - miscellaneous +subordinate: true provides: storage-backend: interface: cinder-backend scope: container requires: + juju-info: + interface: juju-info + scope: container ceph: interface: ceph-client diff --git a/revision b/revision index d00491f..0cfbf08 100644 --- a/revision +++ b/revision @@ -1 +1 @@ -1 +2