Revision cd3b4ff4 lib/cmdlib/cluster.py
b/lib/cmdlib/cluster.py | ||
---|---|---|
495 | 495 |
@param disk: an L{ganeti.objects.Disk} object |
496 | 496 |
|
497 | 497 |
""" |
498 |
if disk.dev_type == constants.LD_DRBD8:
|
|
498 |
if disk.dev_type == constants.DT_DRBD8:
|
|
499 | 499 |
assert disk.children, "Empty children for DRBD8?" |
500 | 500 |
fchild = disk.children[0] |
501 | 501 |
mismatch = fchild.size < disk.size |
... | ... | |
757 | 757 |
" enabling lvm-based disk-templates.") |
758 | 758 |
|
759 | 759 |
if self.op.vg_name is not None and not self.op.vg_name: |
760 |
if self.cfg.HasAnyDiskOfType(constants.LD_LV):
|
|
760 |
if self.cfg.HasAnyDiskOfType(constants.DT_PLAIN):
|
|
761 | 761 |
raise errors.OpPrereqError("Cannot disable lvm storage while lvm-based" |
762 | 762 |
" instances exist", errors.ECODE_INVAL) |
763 | 763 |
|
... | ... | |
859 | 859 |
|
860 | 860 |
""" |
861 | 861 |
if self.op.drbd_helper is not None and not self.op.drbd_helper: |
862 |
if self.cfg.HasAnyDiskOfType(constants.LD_DRBD8):
|
|
862 |
if self.cfg.HasAnyDiskOfType(constants.DT_DRBD8):
|
|
863 | 863 |
raise errors.OpPrereqError("Cannot disable drbd helper while" |
864 | 864 |
" drbd-based instances exist", |
865 | 865 |
errors.ECODE_INVAL) |
Also available in: Unified diff