From ccf4884ea57bac5c28700f511ea386abcfc3c956 Mon Sep 17 00:00:00 2001 From: Nikesh Mahalka Date: Wed, 24 Aug 2016 05:39:07 -0400 Subject: [PATCH] Retype issue in Kaminario Cinder drivers The value of volume.replication_status for a replicated volume is 'disabled' before 'failover-host' and it is changed to "failed-over" after 'failover-host' command if active_backend_id is not equal to secondary array IP. It is changed to 'enabled' after another 'failover-host' command if active_backend_id is equal to secondary array IP(which is failback scenario). After failback, if replication is removed from replicated volume, then retype 'dedup without replication'<->'nodedup without replication' with '--migration-policy on-demand' is not working since value of volume.replication_status is enabled. Change-Id: I193572532a36eaea5d826cff76ca9f98df86dc50 Closes-Bug: #1616329 Co-Authored-By: VenkataKrishna Reddy Co-Authored-By: Lakshman --- cinder/tests/unit/volume/drivers/test_kaminario.py | 2 +- cinder/volume/drivers/kaminario/kaminario_common.py | 2 +- ...aminario-cinder-driver-bug-1616329-c91bb4e747d14f3b.yaml | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/kaminario-cinder-driver-bug-1616329-c91bb4e747d14f3b.yaml diff --git a/cinder/tests/unit/volume/drivers/test_kaminario.py b/cinder/tests/unit/volume/drivers/test_kaminario.py index dd0437e6647..82f0a99f6be 100644 --- a/cinder/tests/unit/volume/drivers/test_kaminario.py +++ b/cinder/tests/unit/volume/drivers/test_kaminario.py @@ -400,7 +400,7 @@ class TestKaminarioISCSI(test.TestCase): backend_ip, res_volumes = self.driver.failover_host(None, volumes) self.assertEqual('10.0.0.2', backend_ip) status = res_volumes[0]['updates']['replication_status'] - self.assertEqual(fields.ReplicationStatus.ENABLED, status) + self.assertEqual(fields.ReplicationStatus.DISABLED, status) def test_delete_volume_replica(self): """Test _delete_volume_replica.""" diff --git a/cinder/volume/drivers/kaminario/kaminario_common.py b/cinder/volume/drivers/kaminario/kaminario_common.py index 4820cc6f855..df951b85378 100644 --- a/cinder/volume/drivers/kaminario/kaminario_common.py +++ b/cinder/volume/drivers/kaminario/kaminario_common.py @@ -499,7 +499,7 @@ class KaminarioCinderDriver(cinder.volume.driver.ISCSIDriver): src_ssn.save() LOG.debug("The target session: %s state is " "changed to in sync", session_name) - rep_status = fields.ReplicationStatus.ENABLED + rep_status = fields.ReplicationStatus.DISABLED volume_updates.append({'volume_id': v['id'], 'updates': {'replication_status': rep_status}}) diff --git a/releasenotes/notes/kaminario-cinder-driver-bug-1616329-c91bb4e747d14f3b.yaml b/releasenotes/notes/kaminario-cinder-driver-bug-1616329-c91bb4e747d14f3b.yaml new file mode 100644 index 00000000000..9b5073a1807 --- /dev/null +++ b/releasenotes/notes/kaminario-cinder-driver-bug-1616329-c91bb4e747d14f3b.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - Fixed retyping 'dedup volume without replication' <-> + 'nodedup volume without replication' after replication failback and + removing replication for a replicated volume in Kaminario iSCSI and + FC Cinder Drivers.