diff --git a/config.yaml b/config.yaml index 26ba1a95..52be3af8 100644 --- a/config.yaml +++ b/config.yaml @@ -196,3 +196,15 @@ options: description: | Apply system hardening. Supports a space-delimited list of modules to run. Supported modules currently include os, ssh, apache and mysql. + default-rbd-features: + default: + type: int + description: | + Restrict the rbd features used to the specified level. If set, this will + inform clients that they should set the config value `rbd default + features`, for example: + + rbd default features = 1 + + This needs to be set to 1 when deploying a cloud with the nova-lxd + hypervisor. \ No newline at end of file diff --git a/hooks/ceph_hooks.py b/hooks/ceph_hooks.py index c25138bb..0b203894 100755 --- a/hooks/ceph_hooks.py +++ b/hooks/ceph_hooks.py @@ -496,6 +496,8 @@ def client_relation_joined(relid=None): data = {'key': ceph.get_named_key(service_name), 'auth': config('auth-supported'), 'ceph-public-address': public_addr} + if config('rbd-features'): + data['rbd_features'] = config('rbd-features') relation_set(relation_id=relid, relation_settings=data) else: diff --git a/templates/ceph.conf b/templates/ceph.conf index b48270fe..25be0167 100644 --- a/templates/ceph.conf +++ b/templates/ceph.conf @@ -37,6 +37,10 @@ cluster addr = {{ cluster_addr }} {% endfor %} {% endif %} +{% if rbd_features %} +rbd default features = {{ rbd_features }} +{% endif %} + [mon] keyring = /var/lib/ceph/mon/$cluster-$id/keyring {% if mon -%}