]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixes cinder failed to create/restore a backup with NFS driver
authorJeff Applewhite <jeff.applewhite@netapp.com>
Thu, 30 Jan 2014 19:11:08 +0000 (14:11 -0500)
committerEric Harney <eharney@redhat.com>
Sat, 8 Feb 2014 00:36:15 +0000 (19:36 -0500)
The action cinder backup-create fails when trying to backup a newly
created volume when using cinder.volume.drivers.nfs.NfsDriver. This
patch removes not implemented stubs for backup_volume and
restore_volume. The inherited methods in cinder/volume/driver.py
succeed in creating a backup and in restoring it. After manual
testing of this change backups/restores succeed without the not
implemented stubs. This change also adds the not implemented
stubs to the glusterfs driver until a fix is submitted.

Closes-Bug: #1247743

Change-Id: I5478d00442ce855c91a7f04c5ba2b40733d44902

cinder/volume/drivers/glusterfs.py
cinder/volume/drivers/nfs.py

index 3b7aa983d55d9b5a8d1a8efc2695a800321a818b..0b15de387cc843c9caf4d2575591407adb26d65a 100644 (file)
@@ -1145,3 +1145,11 @@ class GlusterfsDriver(nfs.RemoteFsDriver):
 
     def _get_mount_point_base(self):
         return self.base
+
+    def backup_volume(self, context, backup, backup_service):
+        """Create a new backup from an existing volume."""
+        raise NotImplementedError()
+
+    def restore_backup(self, context, backup, volume, backup_service):
+        """Restore an existing backup to a new or existing volume."""
+        raise NotImplementedError()
index 24091f5efadeafe73ecde849cd0e8f6930569607..5bf0115f82503952499d2f1cde4516010e9e448b 100644 (file)
@@ -371,14 +371,6 @@ class RemoteFsDriver(driver.VolumeDriver):
     def _ensure_share_mounted(self, nfs_share):
         raise NotImplementedError()
 
-    def backup_volume(self, context, backup, backup_service):
-        """Create a new backup from an existing volume."""
-        raise NotImplementedError()
-
-    def restore_backup(self, context, backup, volume, backup_service):
-        """Restore an existing backup to a new or existing volume."""
-        raise NotImplementedError()
-
 
 class NfsDriver(RemoteFsDriver):
     """NFS based cinder driver. Creates file on NFS share for using it