Fix test_volume_retype for active-active cluster

In case of active-active cluster deployment the host of the cinder
volume might be changed as it is uniq per node.

Related-Prod: PRODX-4874

Change-Id: Ifaf69e1b3563c9c6b729885a45723acacb2c82dd
(cherry picked from commit bd3a416a5e6afefdbd372c9157e9d60505e8cecf)
(cherry picked from commit 155a65a0a767ba1e73dcca098792d0b344571767)
diff --git a/tempest/api/volume/admin/test_volume_retype.py b/tempest/api/volume/admin/test_volume_retype.py
index 4a3f494..7c25f3d 100644
--- a/tempest/api/volume/admin/test_volume_retype.py
+++ b/tempest/api/volume/admin/test_volume_retype.py
@@ -175,10 +175,16 @@
     def _verify_migration(self, volume_source, volume_dest):
 
         keys_with_no_change = ('id', 'size', 'description', 'name',
-                               'user_id', 'os-vol-tenant-attr:tenant_id',
-                               'os-vol-host-attr:host')
+                               'user_id', 'os-vol-tenant-attr:tenant_id',)
         keys_with_change = ('volume_type',)
 
+        # NOTE(vsaienko): with active-active cluster deployment volume
+        # services registered with different hostname.
+        if CONF.volume_feature_enabled.cluster_active_active:
+            keys_with_change += ('os-vol-host-attr:host',)
+        else:
+            keys_with_no_change += ('os-vol-host-attr:host',)
+
         # Check the volume information after the retype
         self.assertIsNone(volume_dest['os-vol-mig-status-attr:migstat'])
         self.assertIsNone(volume_dest['migration_status'])
diff --git a/tempest/config.py b/tempest/config.py
index b4d4891..7d62dda 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -1101,7 +1101,11 @@
                      'server instance? This depends on the 3.42 volume API '
                      'microversion and the 2.51 compute API microversion. '
                      'Also, not all volume or compute backends support this '
-                     'operation.')
+                     'operation.'),
+    cfg.BoolOpt('cluster_active_active',
+                default=False,
+                help='The boolean flag to indicate if active-active mode '
+                     'is used by volume backend.')
 ]