From d4ee73e58b5be7701143b4043146ec723b1fdf89 Mon Sep 17 00:00:00 2001 From: Zohar Mamedov Date: Wed, 4 Aug 2021 09:06:56 +0000 Subject: [PATCH] KumoScale Driver replicated volume missing portals attaches without raid This is the Cinder driver part of the fix for this bug. It helps fix the issue by passing the expected volume replica count (not only the available portals) Closes-Bug: #1938870 Change-Id: I363027a0b1035cb547f61c4f62ca999f93245687 --- cinder/tests/unit/volume/drivers/test_kioxia.py | 3 ++- cinder/volume/drivers/kioxia/kumoscale.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cinder/tests/unit/volume/drivers/test_kioxia.py b/cinder/tests/unit/volume/drivers/test_kioxia.py index 7910a1a9c17..345ecb0b815 100644 --- a/cinder/tests/unit/volume/drivers/test_kioxia.py +++ b/cinder/tests/unit/volume/drivers/test_kioxia.py @@ -183,7 +183,8 @@ class KioxiaVolumeTestCase(test.TestCase): 'vol_uuid': testvol['id'], 'alias': testvol['name'], 'writable': True, - 'volume_replicas': [expected_replica] + 'volume_replicas': [expected_replica], + 'replica_count': 2 } expected_result = { 'driver_volume_type': 'nvmeof', diff --git a/cinder/volume/drivers/kioxia/kumoscale.py b/cinder/volume/drivers/kioxia/kumoscale.py index 379b22ceb42..f3999bde382 100644 --- a/cinder/volume/drivers/kioxia/kumoscale.py +++ b/cinder/volume/drivers/kioxia/kumoscale.py @@ -368,7 +368,8 @@ class KumoScaleBaseVolumeDriver(driver.BaseVD): 'vol_uuid': volume_uuid, 'alias': volume_name, 'writable': ks_volume.writable, - 'volume_replicas': volume_replicas + 'volume_replicas': volume_replicas, + 'replica_count': len(ks_volume_replicas) } if result.status != 'Success':