Revision 8e5a911a lib/cmdlib/instance_storage.py

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):

Also available in: Unified diff