Revision 1a705513 lib/storage/drbd.py

b/lib/storage/drbd.py
453 453
    except utils.RetryTimeout:
454 454
      base.ThrowError("drbd%d: timeout while configuring network", minor)
455 455

  
456
    # Once the assembly is over, try to set the synchronization parameters
457
    try:
458
      # The minor may not have been set yet, requiring us to set it at least
459
      # temporarily
460
      old_minor = self.minor
461
      self._SetFromMinor(minor)
462
      sync_errors = self.SetSyncParams(self.params)
463
      if sync_errors:
464
        base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
465
                        (self.minor, utils.CommaJoin(sync_errors)))
466
    finally:
467
      # Undo the change, regardless of whether it will have to be done again
468
      # soon
469
      self._SetFromMinor(old_minor)
470

  
456 471
  @staticmethod
457 472
  def _GetNetFamily(minor, lhost, rhost):
458 473
    if netutils.IP6Address.IsValid(lhost):
......
805 820
      # the device
806 821
      self._SlowAssemble()
807 822

  
808
    sync_errors = self.SetSyncParams(self.params)
809
    if sync_errors:
810
      base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
811
                      (self.minor, utils.CommaJoin(sync_errors)))
812

  
813 823
  def _SlowAssemble(self):
814 824
    """Assembles the DRBD device from a (partially) configured device.
815 825

  

Also available in: Unified diff