From 677d9c8e4e91e69e198b28bee21abd2f27cf259d Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Mon, 22 Mar 2021 10:50:09 -0700 Subject: [PATCH] Manila: Set multitenancy_enabled in [share] Manila's tests _need_ this configuration, and it defaults to True. However, if there are no backends that satisfy that condition, we need to set this config opt to False, else tests will fail due to misconfiguration. Signed-off-by: Goutham Pacha Ravi Change-Id: I40bf6c53f205318bcd92effed433fa40f230aa02 Signed-off-by: Goutham Pacha Ravi --- config_tempest/services/share.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config_tempest/services/share.py b/config_tempest/services/share.py index b6d2a749..3492a055 100644 --- a/config_tempest/services/share.py +++ b/config_tempest/services/share.py @@ -46,13 +46,21 @@ class ShareService(VersionedService): if pools: backends = set() enable_protocols = set() + dhss = set() for pool in pools: backends.add(pool['backend']) protocol = pool['capabilities']['storage_protocol'].lower() enable_protocols.update(protocol.split('_')) + dhss.add(pool['capabilities']['driver_handles_share_servers']) conf.set('share', 'backend_names', ','.join(backends)) conf.set('share', 'enable_protocols', ','.join(enable_protocols)) + + # NOTE(gouthamr): manila tests can be run with + # driver_handles_share_servers set to either True or False, + # not both at the same time. Lets err on the side of caution and + # set this to True if any DHSS=True backend is present. + conf.set('share', 'multitenancy_enabled', str(any(dhss))) if len(backends) > 1: conf.set('share', 'multi_backend', 'True')