Revision cb7c0198

b/Makefile.am
452 452
	  echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
453 453
	  echo "XEN_INITRD = '$(XEN_INITRD)'"; \
454 454
	  echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
455
	  echo "ENABLE_FILE_STORAGE = $(ENABLE_FILE_STORAGE)"; \
455 456
	  echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
456 457
	  echo "KVM_PATH = '$(KVM_PATH)'"; \
457 458
	  echo "SOCAT_PATH = '$(SOCAT)'"; \
b/configure.ac
104 104
    [directory to store files for file-based backend]
105 105
    [ (default is /srv/ganeti/file-storage)]
106 106
  )],
107
  [file_storage_dir="$withval"],
108
  [file_storage_dir="/srv/ganeti/file-storage"])
107
  [[file_storage_dir="$withval";
108
    if test "$withval" != no; then
109
      enable_file_storage=True
110
    else
111
      enable_file_storage=False
112
    fi
113
  ]],
114
  [[file_storage_dir="/srv/ganeti/file-storage"; enable_file_storage="True"]])
109 115
AC_SUBST(FILE_STORAGE_DIR, $file_storage_dir)
116
AC_SUBST(ENABLE_FILE_STORAGE, $enable_file_storage)
110 117

  
111 118
# --with-kvm-path=...
112 119
AC_ARG_WITH([kvm-path],
b/lib/backend.py
2255 2255
  @return: the normalized path if valid, None otherwise
2256 2256

  
2257 2257
  """
2258
  if not constants.ENABLE_FILE_STORAGE:
2259
    _Fail("File storage disabled at configure time")
2258 2260
  cfg = _GetConfig()
2259 2261
  file_storage_dir = os.path.normpath(file_storage_dir)
2260 2262
  base_file_storage_dir = cfg.GetFileStorageDir()
b/lib/bdev.py
1907 1907
DEV_MAP = {
1908 1908
  constants.LD_LV: LogicalVolume,
1909 1909
  constants.LD_DRBD8: DRBD8,
1910
  constants.LD_FILE: FileStorage,
1911 1910
  }
1912 1911

  
1912
if constants.ENABLE_FILE_STORAGE:
1913
  DEV_MAP[constants.LD_FILE] = FileStorage
1914

  
1913 1915

  
1914 1916
def FindDevice(dev_type, unique_id, children, size):
1915 1917
  """Search for an existing, assembled device.
b/lib/cmdlib.py
5658 5658
      # TODO: make the ip check more flexible and not depend on the name check
5659 5659
      raise errors.OpPrereqError("Cannot do ip checks without a name check",
5660 5660
                                 errors.ECODE_INVAL)
5661
    if (self.op.disk_template == constants.DT_FILE and
5662
        not constants.ENABLE_FILE_STORAGE):
5663
      raise errors.OpPrereqError("File storage disabled at configure time",
5664
                                 errors.ECODE_INVAL)
5661 5665

  
5662 5666
  def ExpandNames(self):
5663 5667
    """ExpandNames for CreateInstance.
b/lib/constants.py
109 109
DAEMON_UTIL = _autoconf.PKGLIBDIR + "/daemon-util"
110 110
ETC_HOSTS = "/etc/hosts"
111 111
DEFAULT_FILE_STORAGE_DIR = _autoconf.FILE_STORAGE_DIR
112
ENABLE_FILE_STORAGE = _autoconf.ENABLE_FILE_STORAGE
112 113
SYSCONFDIR = _autoconf.SYSCONFDIR
113 114
TOOLSDIR = _autoconf.TOOLSDIR
114 115
CONF_DIR = SYSCONFDIR + "/ganeti"

Also available in: Unified diff