Skip to content

Commit 758eae5

Browse files
committed
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 3f53833) (cherry picked from commit e4b41eb21e88e4af81e1f44cc70787af1ce5557b)
1 parent e6af633 commit 758eae5

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

cinder/tests/unit/volume/drivers/dell_emc/unity/test_driver.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,6 @@ def test_unmanage(self):
245245
def test_backup_use_temp_snapshot(self):
246246
self.assertTrue(self.driver.backup_use_temp_snapshot())
247247

248-
def test_create_export_snapshot(self):
249-
snapshot = self.driver.create_export_snapshot(self.get_context(),
250-
self.get_snapshot(),
251-
self.get_connector())
252-
self.assertTrue(snapshot.exists)
253-
254-
def test_remove_export_snapshot(self):
255-
snapshot = self.get_snapshot()
256-
self.driver.remove_export_snapshot(self.get_context(), snapshot)
257-
self.assertFalse(snapshot.exists)
258-
259248
def test_initialize_connection_snapshot(self):
260249
snapshot = self.get_snapshot()
261250
conn_info = self.driver.initialize_connection_snapshot(

cinder/volume/drivers/dell_emc/unity/driver.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ class UnityDriver(driver.TransferVD,
5151
Version history:
5252
00.05.00 - Initial version
5353
00.05.01 - Backport thin clone from Pike
54+
00.05.02 - Fixed bug 170311: temp snapshot for backup was deleted twice
5455
"""
5556

56-
VERSION = '00.05.01'
57+
VERSION = '00.05.02'
5758
VENDOR = 'Dell EMC'
5859
# ThirdPartySystems wiki page
5960
CI_WIKI_NAME = "EMC_UNITY_CI"
@@ -207,12 +208,18 @@ def backup_use_temp_snapshot(self):
207208
return True
208209

209210
def create_export_snapshot(self, context, snapshot, connector):
210-
"""Creates the snapshot for backup."""
211-
return self.adapter.create_snapshot(snapshot)
211+
"""Creates the mount point of the snapshot for backup.
212+
213+
Not necessary to create on Unity.
214+
"""
215+
pass
212216

213217
def remove_export_snapshot(self, context, snapshot):
214-
"""Deletes the snapshot for backup."""
215-
self.adapter.delete_snapshot(snapshot)
218+
"""Deletes the mount point the snapshot for backup.
219+
220+
Not necessary to create on Unity.
221+
"""
222+
pass
216223

217224
def initialize_connection_snapshot(self, snapshot, connector, **kwargs):
218225
return self.adapter.initialize_connection_snapshot(snapshot, connector)

0 commit comments

Comments
 (0)