Ceph Multibackend changes
1. Tempest has an option CONF.compute.compute_volume_common_az to make
sure that Volume and Instance are created in common AZ If Availability
zones are used. The paramater is respected when instance is created
because tempest.common.compute.create_test_server() is used but not
respected when volume is created for test purpose. Let's make sure
AZ is set when volume is created if parameter is set.
2. The plain Encryptor provider is not support on ceph backends, the
test test_encrypted_cinder_volumes_cryptsetup fails on:
cinder.exception.VolumeDriverException: Volume driver reported an error:
Provider plain not supported.
This comes from [1] which is called in [2]. The Plain provider will be deprecated
in future completely.
[1] https://opendev.org/openstack/cinder/src/branch/master/cinder/volume/volume_utils.py#L1195
[2] https://opendev.org/openstack/cinder/src/branch/master/cinder/volume/drivers/rbd.py#L877
Related-Prod: PRODX-3456
Change-Id: Ib6290ed1ad5779e4e6fed449f3335dbdada42f0d
diff --git a/barbican_tempest_plugin/tests/scenario/manager.py b/barbican_tempest_plugin/tests/scenario/manager.py
index f91e27b..4a141ab 100644
--- a/barbican_tempest_plugin/tests/scenario/manager.py
+++ b/barbican_tempest_plugin/tests/scenario/manager.py
@@ -220,6 +220,9 @@
'imageRef': imageRef,
'volume_type': volume_type,
'size': size}
+ if CONF.compute.compute_volume_common_az:
+ kwargs.setdefault('availability_zone',
+ CONF.compute.compute_volume_common_az)
volume = self.volumes_client.create_volume(**kwargs)['volume']
self.addCleanup(self.volumes_client.wait_for_resource_deletion,
diff --git a/barbican_tempest_plugin/tests/scenario/test_volume_encryption.py b/barbican_tempest_plugin/tests/scenario/test_volume_encryption.py
index da7d408..873731f 100644
--- a/barbican_tempest_plugin/tests/scenario/test_volume_encryption.py
+++ b/barbican_tempest_plugin/tests/scenario/test_volume_encryption.py
@@ -12,6 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+import testtools
import time
from oslo_log import log as logging
@@ -124,6 +125,8 @@
volume_type='luks')
self.attach_detach_volume(server, volume, keypair)
+ @testtools.skipIf(CONF.volume.storage_protocol == 'ceph',
+ 'PLAIN encryptor provider is not supported on rbd')
@decorators.idempotent_id('cbc752ed-b716-4727-910f-956ccf965723')
@utils.services('compute', 'volume', 'image')
def test_encrypted_cinder_volumes_cryptsetup(self):