add default features support

Change-Id: Ic640b097f88b238d865b5880bb2ecd682b2a84ec
This commit is contained in:
Chris MacNaughton 2017-07-07 17:11:51 +02:00 committed by Chris MacNaughton
parent e2fc2e3bd9
commit 9625ea7ba7
3 changed files with 18 additions and 0 deletions

View File

@ -239,3 +239,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

@ -519,6 +519,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

@ -41,6 +41,10 @@ cluster addr = {{ cluster_addr }}
enable experimental unrecoverable data corrupting features = bluestore rocksdb
{%- endif %}
{% if rbd_features %}
rbd default features = {{ rbd_features }}
{% endif %}
[mon]
keyring = /var/lib/ceph/mon/$cluster-$id/keyring
{% if mon -%}