Commit 2fe1e043 authored by Helga Velroyen's avatar Helga Velroyen
Browse files

Remove obsolete autoconf variable from remaining files



This removes the obsolete autoconf variable
'ENABLE_SHARED_FILE_STORAGE' from all remaining files.
Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
parent 6b1fa25c
......@@ -1589,7 +1589,6 @@ lib/_autoconf.py: Makefile | stamp-directories
echo "XEN_INITRD = '$(XEN_INITRD)'"; \
echo "KVM_KERNEL = '$(KVM_KERNEL)'"; \
echo "SHARED_FILE_STORAGE_DIR = '$(SHARED_FILE_STORAGE_DIR)'"; \
echo "ENABLE_SHARED_FILE_STORAGE = $(ENABLE_SHARED_FILE_STORAGE)"; \
echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
echo "KVM_PATH = '$(KVM_PATH)'"; \
echo "IP_PATH = '$(IP_PATH)'"; \
......
......@@ -134,17 +134,8 @@ AC_ARG_WITH([shared-file-storage-dir],
[directory to store files for shared file-based backend]
[ (default is /srv/ganeti/shared-file-storage)]
)],
[[shared_file_storage_dir="$withval";
if test "$withval" != no; then
enable_shared_file_storage=True
else
enable_shared_file_storage=False
fi
]],
[[shared_file_storage_dir="/srv/ganeti/shared-file-storage";
enable_shared_file_storage=True]])
[[shared_file_storage_dir="/srv/ganeti/shared-file-storage"]])
AC_SUBST(SHARED_FILE_STORAGE_DIR, $shared_file_storage_dir)
AC_SUBST(ENABLE_SHARED_FILE_STORAGE, $enable_shared_file_storage)
# --with-kvm-path=...
AC_ARG_WITH([kvm-path],
......
......@@ -145,7 +145,6 @@ RUN_DIRS_MODE = 0775
SECURE_DIR_MODE = 0700
SECURE_FILE_MODE = 0600
ADOPTABLE_BLOCKDEV_ROOT = "/dev/disk/"
ENABLE_SHARED_FILE_STORAGE = _autoconf.ENABLE_SHARED_FILE_STORAGE
ENABLE_CONFD = _autoconf.ENABLE_CONFD
ENABLE_MOND = _autoconf.ENABLE_MOND
ENABLE_SPLIT_QUERY = _autoconf.ENABLE_SPLIT_QUERY
......
......@@ -31,13 +31,9 @@ from ganeti import vcluster
# Build-time constants
DEFAULT_FILE_STORAGE_DIR = "/srv/ganeti/file-storage"
DEFAULT_FILE_STORAGE_DIR = vcluster.AddNodePrefix(DEFAULT_FILE_STORAGE_DIR)
DEFAULT_SHARED_FILE_STORAGE_DIR = "/srv/ganeti/shared-file-storage"
if _autoconf.ENABLE_SHARED_FILE_STORAGE:
DEFAULT_SHARED_FILE_STORAGE_DIR = \
vcluster.AddNodePrefix(_autoconf.SHARED_FILE_STORAGE_DIR)
else:
DEFAULT_SHARED_FILE_STORAGE_DIR = _autoconf.SHARED_FILE_STORAGE_DIR
DEFAULT_SHARED_FILE_STORAGE_DIR = \
vcluster.AddNodePrefix(DEFAULT_SHARED_FILE_STORAGE_DIR)
EXPORT_DIR = vcluster.AddNodePrefix(_autoconf.EXPORT_DIR)
OS_SEARCH_PATH = _autoconf.OS_SEARCH_PATH
ES_SEARCH_PATH = _autoconf.ES_SEARCH_PATH
......
......@@ -97,10 +97,8 @@ def _GetDefaultStorageUnitForDiskTemplate(cfg, disk_template):
return (storage_type, cfg.GetVGName())
elif disk_template == constants.DT_FILE:
return (storage_type, cluster.file_storage_dir)
# FIXME: Adjust this, once SHARED_FILE_STORAGE_DIR
# is not in autoconf anymore.
elif disk_template == constants.DT_SHARED_FILE:
return (storage_type, pathutils.DEFAULT_SHARED_FILE_STORAGE_DIR)
return (storage_type, cluster.shared_file_storage_dir)
else:
return (storage_type, None)
......
......@@ -37,7 +37,7 @@ module Test.Ganeti.Types
, JobId(..)
) where
import Data.List (delete, sort)
import Data.List (sort)
import Test.QuickCheck as QuickCheck hiding (Result)
import Test.HUnit
import qualified Text.JSON as J
......@@ -81,12 +81,7 @@ $(genArbitrary ''AllocPolicy)
-- | Valid disk templates (depending on configure options).
allDiskTemplates :: [DiskTemplate]
allDiskTemplates =
let all_vals = [minBound..maxBound]::[DiskTemplate]
sel1 = if C.enableSharedFileStorage
then all_vals
else delete DTSharedFile all_vals
in sel1
allDiskTemplates = [minBound..maxBound]::[DiskTemplate]
-- | Custom 'Arbitrary' instance for 'DiskTemplate', which needs to
-- handle the case of file storage being disabled at configure time.
......
......@@ -27,7 +27,6 @@ import unittest
from ganeti import constants
from ganeti import objects
from ganeti import pathutils
from ganeti.utils import storage
import testutils
......@@ -39,6 +38,7 @@ class TestGetStorageUnitForDiskTemplate(unittest.TestCase):
self._default_vg_name = "some_vg_name"
self._cluster = mock.Mock()
self._cluster.file_storage_dir = "my/file/storage/dir"
self._cluster.shared_file_storage_dir = "my/shared/file/storage/dir"
self._cfg = mock.Mock()
self._cfg.GetVGName = mock.Mock(return_value=self._default_vg_name)
self._cfg.GetClusterInfo = mock.Mock(return_value=self._cluster)
......@@ -63,7 +63,7 @@ class TestGetStorageUnitForDiskTemplate(unittest.TestCase):
storage._GetDefaultStorageUnitForDiskTemplate(self._cfg,
constants.DT_SHARED_FILE)
self.assertEqual(storage_type, constants.ST_FILE)
self.assertEqual(storage_key, pathutils.DEFAULT_SHARED_FILE_STORAGE_DIR)
self.assertEqual(storage_key, self._cluster.shared_file_storage_dir)
def testGetDefaultStorageUnitForDiskTemplateDiskless(self):
(storage_type, storage_key) = \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment