add default features support

Change-Id: I0f0491180561aa75c43aac4a64acc9170622a6e6
This commit is contained in:
Chris MacNaughton 2017-07-07 17:16:55 +02:00
parent a1f2db54c3
commit f1b925aa59
3 changed files with 18 additions and 0 deletions

View File

@ -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.

View File

@ -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:

View File

@ -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 -%}