From a70f34d16b02057a3209843585c9cac9ccab4cf1 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 26 Nov 2007 08:39:02 +0000
Subject: [PATCH] Drop the Rename method of DRBD8 devices

Since we now do changes of remote peers in two steps (Attach with no
network information and then Attach with the new peer's data), we don't
need this operation anymore.

Reviewed-by: imsnah
---
 lib/bdev.py | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/lib/bdev.py b/lib/bdev.py
index e76d6f50b..29a90ad46 100644
--- a/lib/bdev.py
+++ b/lib/bdev.py
@@ -2223,27 +2223,6 @@ class DRBD8(BaseDRBD):
     self.dev_path = None
     return True
 
-  def Rename(self, new_uid):
-    """Re-connect this device to another peer.
-
-    """
-    if self.minor is None:
-      raise errors.BlockDeviceError("Device not attached during rename")
-    if self._rhost is not None:
-      # this means we did have a host when we attached, so we are connected
-      if not self._ShutdownNet(self.minor):
-        raise errors.BlockDeviceError("Can't disconnect from remote peer")
-      old_id = self.unique_id
-    else:
-      old_id = None
-    self.unique_id = new_uid
-    if not self._AssembleNet(self.minor, self.unique_id, "C"):
-      logger.Error("Can't attach to new peer!")
-      if old_id is not None:
-        self._AssembleNet(self.minor, old_id, "C")
-      self.unique_id = old_id
-      raise errors.BlockDeviceError("Can't attach to new peer")
-
   def Remove(self):
     """Stub remove for DRBD devices.
 
-- 
GitLab