Commit 40960882 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Move vcluster-related constants to Constants.hs



...as, in that way, they will also be available in Haskell,
where job replication happens as well.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent ae297dc8
......@@ -30,18 +30,18 @@ functions' docstrings for details.
import os
from ganeti import compat
from ganeti import _constants
# cannot use constants, as this would cause a circular import
ETC_HOSTS = "/etc/hosts"
ETC_HOSTS = _constants.V_CLUSTER_ETC_HOSTS
_VIRT_PATH_PREFIX = "/###-VIRTUAL-PATH-###,"
_ROOTDIR_ENVNAME = "GANETI_ROOTDIR"
_HOSTNAME_ENVNAME = "GANETI_HOSTNAME"
_VIRT_PATH_PREFIX = _constants.V_CLUSTER_VIRT_PATH_PREFIX
_ROOTDIR_ENVNAME = _constants.V_CLUSTER_ROOTDIR_ENVNAME
_HOSTNAME_ENVNAME = _constants.V_CLUSTER_HOSTNAME_ENVNAME
#: List of paths which shouldn't be virtualized
_VPATH_WHITELIST = compat.UniqueFrozenset([
ETC_HOSTS,
])
_VPATH_WHITELIST = _constants.V_CLUSTER_VPATH_WHITELIST
def _GetRootDirectory(envname):
......
......@@ -4281,6 +4281,23 @@ ndsSsconf = "ssconf"
ndsStartNodeDaemon :: String
ndsStartNodeDaemon = "start_node_daemon"
-- * VCluster related constants
vClusterEtcHosts :: String
vClusterEtcHosts = "/etc/hosts"
vClusterVirtPathPrefix :: String
vClusterVirtPathPrefix = "/###-VIRTUAL-PATH-###,"
vClusterRootdirEnvname :: String
vClusterRootdirEnvname = "GANETI_ROOTDIR"
vClusterHostnameEnvname :: String
vClusterHostnameEnvname = "GANETI_HOSTNAME"
vClusterVpathWhitelist :: FrozenSet String
vClusterVpathWhitelist = ConstantUtils.mkSet [ vClusterEtcHosts ]
-- * The source reasons for the execution of an OpCode
opcodeReasonSrcClient :: String
......
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