Revision 12c3449a lib/cmdlib.py

b/lib/cmdlib.py
3375 3375
        self.op.mode = constants.REPLACE_DISK_SEC
3376 3376

  
3377 3377
      if self.op.mode == constants.REPLACE_DISK_ALL:
3378
        raise errors.OpPrereqError("Template 'drbd8' only allows primary or"
3378
        raise errors.OpPrereqError("Template 'drbd' only allows primary or"
3379 3379
                                   " secondary disk replacement, not"
3380 3380
                                   " both at once")
3381 3381
      elif self.op.mode == constants.REPLACE_DISK_PRI:
3382 3382
        if remote_node is not None:
3383
          raise errors.OpPrereqError("Template 'drbd8' does not allow changing"
3383
          raise errors.OpPrereqError("Template 'drbd' does not allow changing"
3384 3384
                                     " the secondary while doing a primary"
3385 3385
                                     " node disk replacement")
3386 3386
        self.tgt_node = instance.primary_node

Also available in: Unified diff