Logo Search packages:      
Sourcecode: ganeti version File versions  Download package

def lib::bdev::DRBD8::RemoveChildren (   self,

Detach the drbd device from local storage.

Definition at line 1925 of file bdev.py.

01925                                    :
    """Detach the drbd device from local storage.

    if self.minor is None:
      raise errors.BlockDeviceError("Can't attach to drbd8 during"
                                    " RemoveChildren")
    # early return if we don't actually have backing storage
    info = self._GetDevInfo(self.minor)
    if "local_dev" not in info:
    if len(self._children) != 2:
      raise errors.BlockDeviceError("We don't have two children: %s" %
    if self._children.count(None) == 2: # we don't actually have children :)
      logger.Error("Requested detach while detached")
    if len(devices) != 2:
      raise errors.BlockDeviceError("We need two children in RemoveChildren")
    for child, dev in zip(self._children, devices):
      if dev != child.dev_path:
        raise errors.BlockDeviceError("Mismatch in local storage"
                                      " (%s != %s) in RemoveChildren" %
                                      (dev, child.dev_path))

    if not self._ShutdownLocal(self.minor):
      raise errors.BlockDeviceError("Can't detach from local storage")
    self._children = []

  def SetSyncSpeed(self, kbytes):

Generated by  Doxygen 1.6.0   Back to index