From e4b41eb21e88e4af81e1f44cc70787af1ce5557b Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Fri, 30 Jun 2017 11:05:04 +0800 Subject: [PATCH] Unity: temp snapshot for backup deleted twice Remove the codes in `create/remove_export_snapshot`. The code there is designed for mounting snapshots for remotefs filesystems. It is unnecessary in Unity. Change-Id: Ib2dcba29ca4d97f77501fd0068499aad09984ad6 Closes-bug: 1701311 (cherry picked from commit 3f53833c9e47aafa076b6a4264da2c1b20d5774b) --- .../drivers/dell_emc/unity/test_driver.py | 11 ----------- .../volume/drivers/dell_emc/unity/driver.py | 19 +++++++++++++------ 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/cinder/tests/unit/volume/drivers/dell_emc/unity/test_driver.py b/cinder/tests/unit/volume/drivers/dell_emc/unity/test_driver.py index b1ce7721bd1..c5904f741c3 100644 --- a/cinder/tests/unit/volume/drivers/dell_emc/unity/test_driver.py +++ b/cinder/tests/unit/volume/drivers/dell_emc/unity/test_driver.py @@ -245,17 +245,6 @@ class UnityDriverTest(unittest.TestCase): def test_backup_use_temp_snapshot(self): self.assertTrue(self.driver.backup_use_temp_snapshot()) - def test_create_export_snapshot(self): - snapshot = self.driver.create_export_snapshot(self.get_context(), - self.get_snapshot(), - self.get_connector()) - self.assertTrue(snapshot.exists) - - def test_remove_export_snapshot(self): - snapshot = self.get_snapshot() - self.driver.remove_export_snapshot(self.get_context(), snapshot) - self.assertFalse(snapshot.exists) - def test_initialize_connection_snapshot(self): snapshot = self.get_snapshot() conn_info = self.driver.initialize_connection_snapshot( diff --git a/cinder/volume/drivers/dell_emc/unity/driver.py b/cinder/volume/drivers/dell_emc/unity/driver.py index 6cb35483406..77f4b34a597 100644 --- a/cinder/volume/drivers/dell_emc/unity/driver.py +++ b/cinder/volume/drivers/dell_emc/unity/driver.py @@ -48,10 +48,11 @@ class UnityDriver(driver.ManageableVD, """Unity Driver. Version history: - 1.0.0 - Initial version + 1.0.0 - Initial version (Ocata) + 1.0.1 - Fixed bug 170311: temp snapshot for backup was deleted twice """ - VERSION = '01.00.00' + VERSION = '01.00.01' VENDOR = 'Dell EMC' # ThirdPartySystems wiki page CI_WIKI_NAME = "EMC_UNITY_CI" @@ -205,12 +206,18 @@ class UnityDriver(driver.ManageableVD, return True def create_export_snapshot(self, context, snapshot, connector): - """Creates the snapshot for backup.""" - return self.adapter.create_snapshot(snapshot) + """Creates the mount point of the snapshot for backup. + + Not necessary to create on Unity. + """ + pass def remove_export_snapshot(self, context, snapshot): - """Deletes the snapshot for backup.""" - self.adapter.delete_snapshot(snapshot) + """Deletes the mount point the snapshot for backup. + + Not necessary to create on Unity. + """ + pass def initialize_connection_snapshot(self, snapshot, connector, **kwargs): return self.adapter.initialize_connection_snapshot(snapshot, connector)