Revision 8e5a911a
b/lib/cmdlib/instance_storage.py | ||
---|---|---|
1423 | 1423 |
|
1424 | 1424 |
def _CheckDiskSpace(self, node_uuids, req_vgspace): |
1425 | 1425 |
template = self.instance.disk_template |
1426 |
if template not in (constants.DTS_NO_FREE_SPACE_CHECK): |
|
1426 |
if (template not in (constants.DTS_NO_FREE_SPACE_CHECK) and |
|
1427 |
not any(self.node_es_flags.values())): |
|
1427 | 1428 |
# TODO: check the free disk space for file, when that feature will be |
1428 | 1429 |
# supported |
1429 |
if any(self.node_es_flags.values()): |
|
1430 |
# With exclusive storage we need to something smarter than just looking |
|
1431 |
# at free space; for now, let's simply abort the operation. |
|
1432 |
raise errors.OpPrereqError("Cannot grow disks when exclusive_storage" |
|
1433 |
" is enabled", errors.ECODE_STATE) |
|
1430 |
# With exclusive storage we need to do something smarter than just looking |
|
1431 |
# at free space, which, in the end, is basically a dry run. So we rely on |
|
1432 |
# the dry run performed in Exec() instead. |
|
1434 | 1433 |
CheckNodesFreeDiskPerVG(self, node_uuids, req_vgspace) |
1435 | 1434 |
|
1436 | 1435 |
def Exec(self, feedback_fn): |
b/qa/qa_instance.py | ||
---|---|---|
652 | 652 |
@InstanceCheck(INST_DOWN, INST_DOWN, FIRST_ARG) |
653 | 653 |
def TestInstanceGrowDisk(instance): |
654 | 654 |
"""gnt-instance grow-disk""" |
655 |
if qa_config.GetExclusiveStorage(): |
|
656 |
print qa_utils.FormatInfo("Test not supported with exclusive_storage") |
|
657 |
return |
|
658 |
|
|
659 | 655 |
if instance.disk_template == constants.DT_DISKLESS: |
660 | 656 |
print qa_utils.FormatInfo("Test not supported for diskless instances") |
661 | 657 |
return |
Also available in: Unified diff