from ganeti import _autoconf
from ganeti import _vcsversion
+from ganeti import pathutils
+
# various versions
RELEASE_VERSION = _autoconf.PACKAGE_VERSION
# | + Minor version
# + Major version
#
-# It stored as an integer. Make sure not to write an octal number.
+# It is stored as an integer. Make sure not to write an octal number.
# BuildVersion and SplitVersion must be in here because we can't import other
# modules. The cfgupgrade tool must be able to read and write version numbers
CONFD_GROUP = _autoconf.CONFD_GROUP
NODED_USER = _autoconf.NODED_USER
NODED_GROUP = _autoconf.NODED_GROUP
+SSH_LOGIN_USER = _autoconf.SSH_LOGIN_USER
+SSH_CONSOLE_USER = _autoconf.SSH_CONSOLE_USER
# cpu pinning separators and constants
CPU_PINNING_SEP = ":"
# Wipe
DD_CMD = "dd"
-WIPE_BLOCK_SIZE = 1024 ** 2
MAX_WIPE_CHUNK = 1024 # 1GB
MIN_WIPE_CHUNK_PERCENT = 10
-
-# file paths
-DATA_DIR = _autoconf.LOCALSTATEDIR + "/lib/ganeti"
-RUN_DIR = _autoconf.LOCALSTATEDIR + "/run"
-RUN_GANETI_DIR = RUN_DIR + "/ganeti"
-BDEV_CACHE_DIR = RUN_GANETI_DIR + "/bdev-cache"
-DISK_LINKS_DIR = RUN_GANETI_DIR + "/instance-disks"
RUN_DIRS_MODE = 0775
-SOCKET_DIR = RUN_GANETI_DIR + "/socket"
SECURE_DIR_MODE = 0700
SECURE_FILE_MODE = 0600
-CRYPTO_KEYS_DIR = RUN_GANETI_DIR + "/crypto"
-IMPORT_EXPORT_DIR = RUN_GANETI_DIR + "/import-export"
ADOPTABLE_BLOCKDEV_ROOT = "/dev/disk/"
-LOCK_DIR = _autoconf.LOCALSTATEDIR + "/lock"
-SSCONF_LOCK_FILE = LOCK_DIR + "/ganeti-ssconf.lock"
-# User-id pool lock directory
-# The user-ids that are in use have a corresponding lock file in this directory
-UIDPOOL_LOCKDIR = RUN_GANETI_DIR + "/uid-pool"
-CLUSTER_CONF_FILE = DATA_DIR + "/config.data"
-NODED_CERT_FILE = DATA_DIR + "/server.pem"
-RAPI_CERT_FILE = DATA_DIR + "/rapi.pem"
-CONFD_HMAC_KEY = DATA_DIR + "/hmac.key"
-SPICE_CERT_FILE = DATA_DIR + "/spice.pem"
-SPICE_CACERT_FILE = DATA_DIR + "/spice-ca.pem"
-CLUSTER_DOMAIN_SECRET_FILE = DATA_DIR + "/cluster-domain-secret"
-INSTANCE_STATUS_FILE = RUN_GANETI_DIR + "/instance-status"
-SSH_KNOWN_HOSTS_FILE = DATA_DIR + "/known_hosts"
-RAPI_USERS_FILE = DATA_DIR + "/rapi/users"
-QUEUE_DIR = DATA_DIR + "/queue"
-DAEMON_UTIL = _autoconf.PKGLIBDIR + "/daemon-util"
-SETUP_SSH = _autoconf.TOOLSDIR + "/setup-ssh"
-KVM_IFUP = _autoconf.PKGLIBDIR + "/kvm-ifup"
-KVM_CONSOLE_WRAPPER = _autoconf.PKGLIBDIR + "/tools/kvm-console-wrapper"
-XM_CONSOLE_WRAPPER = _autoconf.PKGLIBDIR + "/tools/xm-console-wrapper"
-ETC_HOSTS = "/etc/hosts"
-DEFAULT_FILE_STORAGE_DIR = _autoconf.FILE_STORAGE_DIR
-DEFAULT_SHARED_FILE_STORAGE_DIR = _autoconf.SHARED_FILE_STORAGE_DIR
ENABLE_FILE_STORAGE = _autoconf.ENABLE_FILE_STORAGE
ENABLE_SHARED_FILE_STORAGE = _autoconf.ENABLE_SHARED_FILE_STORAGE
-SYSCONFDIR = _autoconf.SYSCONFDIR
-TOOLSDIR = _autoconf.TOOLSDIR
-CONF_DIR = SYSCONFDIR + "/ganeti"
-USER_SCRIPTS_DIR = CONF_DIR + "/scripts"
ENABLE_CONFD = _autoconf.ENABLE_CONFD
-HS_CONFD = _autoconf.HS_CONFD
-
-#: Lock file for watcher, locked in shared mode by watcher; lock in exclusive
-# mode to block watcher (see L{cli._RunWhileClusterStoppedHelper.Call}
-WATCHER_LOCK_FILE = LOCK_DIR + "/ganeti-watcher.lock"
-
-#: Status file for per-group watcher, locked in exclusive mode by watcher
-WATCHER_GROUP_STATE_FILE = DATA_DIR + "/watcher.%s.data"
-
-#: File for per-group instance status, merged into L{INSTANCE_STATUS_FILE} by
-#: per-group processes
-WATCHER_GROUP_INSTANCE_STATUS_FILE = DATA_DIR + "/watcher.%s.instance-status"
-
-#: File containing Unix timestamp until which watcher should be paused
-WATCHER_PAUSEFILE = DATA_DIR + "/watcher.pause"
-
-# Master IP address setup scripts paths (default and user-provided)
-DEFAULT_MASTER_SETUP_SCRIPT = TOOLSDIR + "/master-ip-setup"
-EXTERNAL_MASTER_SETUP_SCRIPT = USER_SCRIPTS_DIR + "/master-ip-setup"
-
-ALL_CERT_FILES = frozenset([
- NODED_CERT_FILE,
- RAPI_CERT_FILE,
- SPICE_CERT_FILE,
- SPICE_CACERT_FILE,
- ])
-
-MASTER_SOCKET = SOCKET_DIR + "/ganeti-master"
+ENABLE_SPLIT_QUERY = _autoconf.ENABLE_SPLIT_QUERY
+ENABLE_RESTRICTED_COMMANDS = _autoconf.ENABLE_RESTRICTED_COMMANDS
NODED = "ganeti-noded"
CONFD = "ganeti-confd"
FIRST_DRBD_PORT = 11000
LAST_DRBD_PORT = 14999
-LOG_DIR = _autoconf.LOCALSTATEDIR + "/log/ganeti/"
DAEMONS_LOGFILES = {
- # "daemon-name": "logfile"
- NODED: LOG_DIR + "node-daemon.log",
- CONFD: LOG_DIR + "conf-daemon.log",
- RAPI: LOG_DIR + "rapi-daemon.log",
- MASTERD: LOG_DIR + "master-daemon.log",
- # used in the ganeti-nbma project
- NLD: LOG_DIR + "nl-daemon.log",
+ NODED: pathutils.GetLogFilename("node-daemon"),
+ CONFD: pathutils.GetLogFilename("conf-daemon"),
+ RAPI: pathutils.GetLogFilename("rapi-daemon"),
+ MASTERD: pathutils.GetLogFilename("master-daemon"),
}
-LOG_OS_DIR = LOG_DIR + "os"
-LOG_WATCHER = LOG_DIR + "watcher.log"
-LOG_COMMANDS = LOG_DIR + "commands.log"
-LOG_BURNIN = LOG_DIR + "burnin.log"
-LOG_SETUP_SSH = LOG_DIR + "setup-ssh.log"
-
DEV_CONSOLE = "/dev/console"
PROC_MOUNTS = "/proc/mounts"
SYSLOG_ONLY = "only"
SYSLOG_SOCKET = "/dev/log"
-OS_SEARCH_PATH = _autoconf.OS_SEARCH_PATH
-EXPORT_DIR = _autoconf.EXPORT_DIR
-
EXPORT_CONF_FILE = "config.ini"
XEN_BOOTLOADER = _autoconf.XEN_BOOTLOADER
XEN_CMD_XL = "xl"
# FIXME: This will be made configurable using hvparams in Ganeti 2.7
XEN_CMD = _autoconf.XEN_CMD
+# When the Xen toolstack used is "xl", live migration requires the source host
+# to connect to the target host via ssh (xl runs this command). We need to pass
+# the command xl runs some extra info so that it can use Ganeti's key
+# verification and not fail. Note that this string is incomplete: it must be
+# filled with the cluster name before being used.
+XL_SSH_CMD = ("ssh -l %s -oGlobalKnownHostsFile=%s"
+ " -oUserKnownHostsFile=/dev/null"
+ " -oCheckHostIp=no -oStrictHostKeyChecking=yes"
+ " -oHostKeyAlias=%%s") % (SSH_LOGIN_USER,
+ pathutils.SSH_KNOWN_HOSTS_FILE)
KVM_PATH = _autoconf.KVM_PATH
KVM_KERNEL = _autoconf.KVM_KERNEL
X509_CERT_SIGNATURE_HEADER = "X-Ganeti-Signature"
-IMPORT_EXPORT_DAEMON = _autoconf.PKGLIBDIR + "/import-export"
-
# Import/export daemon mode
IEM_IMPORT = "import"
IEM_EXPORT = "export"
EXT_PLUGIN_MASK = re.compile("^[a-zA-Z0-9_-]+$")
# hooks-related constants
-HOOKS_BASE_DIR = CONF_DIR + "/hooks"
HOOKS_PHASE_PRE = "pre"
HOOKS_PHASE_POST = "post"
HOOKS_NAME_CFGUPDATE = "config-update"
HTYPE_NODE = "NODE"
HTYPE_GROUP = "GROUP"
HTYPE_INSTANCE = "INSTANCE"
+HTYPE_NETWORK = "NETWORK"
HKR_SKIP = 0
HKR_FAIL = 1
SF_SIZE,
SF_USED,
SF_FREE,
- SF_ALLOCATABLE
+ SF_ALLOCATABLE,
])
VALID_STORAGE_TYPES = frozenset([ST_FILE, ST_LVM_PV, ST_LVM_VG])
DRBD_HMAC_ALG = "md5"
DRBD_NET_PROTOCOL = "C"
+#: Size of DRBD meta block device
+DRBD_META_SIZE = 128
+
# drbd barrier types
DRBD_B_NONE = "n"
DRBD_B_DISK_BARRIERS = "b"
frozenset([DRBD_B_DISK_DRAIN]),
frozenset([DRBD_B_DISK_FLUSH]),
frozenset([DRBD_B_DISK_DRAIN, DRBD_B_DISK_FLUSH]),
- frozenset([DRBD_B_DISK_DRAIN, DRBD_B_DISK_FLUSH]),
frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_DRAIN]),
frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_FLUSH]),
frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_FLUSH, DRBD_B_DISK_DRAIN]),
DT_FILE,
DT_SHARED_FILE,
DT_BLOCK,
- DT_RBD
+ DT_RBD,
])
FILE_DRIVER = frozenset([FD_LOOP, FD_BLKTAP])
TAG_NODEGROUP = "nodegroup"
TAG_NODE = "node"
TAG_INSTANCE = "instance"
+TAG_NETWORK = "network"
VALID_TAG_TYPES = frozenset([
TAG_CLUSTER,
TAG_NODEGROUP,
TAG_NODE,
TAG_INSTANCE,
+ TAG_NETWORK,
])
MAX_TAG_LEN = 128
MAX_TAGS_PER_OBJ = 4096
IP6_FAMILY = socket.AF_INET6
TCP_PING_TIMEOUT = 10
-GANETI_RUNAS = "root"
DEFAULT_VG = "xenvg"
DEFAULT_DRBD_HELPER = "/bin/true"
MIN_VG_SIZE = 20480
(RPC_ENCODING_NONE,
RPC_ENCODING_ZLIB_BASE64) = range(2)
+# Various time constants for the timeout table
+RPC_TMO_URGENT = 60 # one minute
+RPC_TMO_FAST = 5 * 60 # five minutes
+RPC_TMO_NORMAL = 15 * 60 # 15 minutes
+RPC_TMO_SLOW = 3600 # one hour
+RPC_TMO_4HRS = 4 * 3600
+RPC_TMO_1DAY = 86400
+
+# Timeout for connecting to nodes (seconds)
+RPC_CONNECT_TIMEOUT = 5
+
# os related constants
OS_SCRIPT_CREATE = "create"
OS_SCRIPT_IMPORT = "import"
OS_SCRIPT_IMPORT,
OS_SCRIPT_EXPORT,
OS_SCRIPT_RENAME,
- OS_SCRIPT_VERIFY
+ OS_SCRIPT_VERIFY,
])
OS_API_FILE = "ganeti_api_version"
OS_VALIDATE_CALLS = frozenset([OS_VALIDATE_PARAMETERS])
# ssh constants
-SSH_CONFIG_DIR = _autoconf.SSH_CONFIG_DIR
-SSH_HOST_DSA_PRIV = SSH_CONFIG_DIR + "/ssh_host_dsa_key"
-SSH_HOST_DSA_PUB = SSH_HOST_DSA_PRIV + ".pub"
-SSH_HOST_RSA_PRIV = SSH_CONFIG_DIR + "/ssh_host_rsa_key"
-SSH_HOST_RSA_PUB = SSH_HOST_RSA_PRIV + ".pub"
SSH = "ssh"
SCP = "scp"
REBOOT_TYPES = frozenset([
INSTANCE_REBOOT_SOFT,
INSTANCE_REBOOT_HARD,
- INSTANCE_REBOOT_FULL
+ INSTANCE_REBOOT_FULL,
])
# instance reboot behaviors
REBOOT_BEHAVIORS = frozenset([
INSTANCE_REBOOT_ALLOWED,
- INSTANCE_REBOOT_EXIT
+ INSTANCE_REBOOT_EXIT,
])
VTYPE_STRING = "string"
HV_BLOCKDEV_PREFIX = "blockdev_prefix"
HV_REBOOT_BEHAVIOR = "reboot_behavior"
HV_CPU_TYPE = "cpu_type"
+HV_CPU_CAP = "cpu_cap"
+HV_CPU_WEIGHT = "cpu_weight"
+
HVS_PARAMETER_TYPES = {
HV_BOOT_ORDER: VTYPE_STRING,
HV_BLOCKDEV_PREFIX: VTYPE_STRING,
HV_REBOOT_BEHAVIOR: VTYPE_STRING,
HV_CPU_TYPE: VTYPE_STRING,
+ HV_CPU_CAP: VTYPE_INT,
+ HV_CPU_WEIGHT: VTYPE_INT,
}
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
+HVS_PARAMETER_TITLES = {
+ HV_ACPI: "ACPI",
+ HV_BOOT_ORDER: "Boot_order",
+ HV_CDROM_IMAGE_PATH: "CDROM_image_path",
+ HV_DISK_TYPE: "Disk_type",
+ HV_INITRD_PATH: "Initrd_path",
+ HV_KERNEL_PATH: "Kernel_path",
+ HV_NIC_TYPE: "NIC_type",
+ HV_PAE: "PAE",
+ HV_VNC_BIND_ADDRESS: "VNC_bind_address",
+ HV_PASSTHROUGH: "pci_pass",
+ HV_CPU_TYPE: "cpu_type",
+ }
+
# Migration statuses
HV_MIGRATION_COMPLETED = "completed"
HV_MIGRATION_ACTIVE = "active"
BE_SPINDLE_USE: VTYPE_INT,
}
+BES_PARAMETER_TITLES = {
+ BE_AUTO_BALANCE: "Auto_balance",
+ BE_MAXMEM: "ConfigMaxMem",
+ BE_MINMEM: "ConfigMinMem",
+ BE_VCPUS: "ConfigVCPUs",
+ }
+
BES_PARAMETER_COMPAT = {
BE_MEMORY: VTYPE_SIZE,
}
NDS_PARAMETERS = frozenset(NDS_PARAMETER_TYPES.keys())
+NDS_PARAMETER_TITLES = {
+ ND_OOB_PROGRAM: "OutOfBandProgram",
+ ND_SPINDLE_COUNT: "SpindleCount",
+ }
+
# Logical Disks parameters
LDP_RESYNC_RATE = "resync-rate"
LDP_STRIPES = "stripes"
OOB_POWER_OFF,
OOB_POWER_CYCLE,
OOB_POWER_STATUS,
- OOB_HEALTH
+ OOB_HEALTH,
])
OOB_POWER_STATUS_POWERED = "powered"
NIC_MODE_BRIDGED = "bridged"
NIC_MODE_ROUTED = "routed"
+NIC_IP_POOL = "pool"
NIC_VALID_MODES = frozenset([NIC_MODE_BRIDGED, NIC_MODE_ROUTED])
+RESERVE_ACTION = "reserve"
+RELEASE_ACTION = "release"
+
+# An extra description of the network.
+# Can be used by hooks/kvm-vif-bridge to apply different rules
+NETWORK_TYPE_PRIVATE = "private"
+NETWORK_TYPE_PUBLIC = "public"
+
+NETWORK_VALID_TYPES = frozenset([NETWORK_TYPE_PRIVATE, NETWORK_TYPE_PUBLIC])
+
NICS_PARAMETER_TYPES = {
NIC_MODE: VTYPE_STRING,
NIC_LINK: VTYPE_STRING,
INIC_IP = "ip"
INIC_MODE = "mode"
INIC_LINK = "link"
+INIC_NETWORK = "network"
INIC_PARAMS_TYPES = {
INIC_IP: VTYPE_MAYBE_STRING,
INIC_LINK: VTYPE_STRING,
INIC_MAC: VTYPE_STRING,
INIC_MODE: VTYPE_STRING,
+ INIC_NETWORK: VTYPE_MAYBE_STRING,
}
INIC_PARAMS = frozenset(INIC_PARAMS_TYPES.keys())
HTS_REQ_PORT = frozenset([HT_XEN_HVM, HT_KVM])
VNC_BASE_PORT = 5900
-VNC_PASSWORD_FILE = CONF_DIR + "/vnc-cluster-password"
VNC_DEFAULT_BIND_ADDRESS = IP4_ADDRESS_ANY
# NIC types
HT_NIC_NE2K_PCI,
HT_NIC_E1000,
HT_NIC_NE2K_ISA,
- HT_NIC_PARAVIRTUAL
+ HT_NIC_PARAVIRTUAL,
])
HT_KVM_VALID_NIC_TYPES = frozenset([
HT_NIC_RTL8139,
HT_NIC_I8259ER,
HT_NIC_PCNET,
HT_NIC_E1000,
- HT_NIC_PARAVIRTUAL
+ HT_NIC_PARAVIRTUAL,
])
# Disk types
HT_CACHE_DEFAULT,
HT_CACHE_NONE,
HT_CACHE_WTHROUGH,
- HT_CACHE_WBACK
+ HT_CACHE_WBACK,
])
HT_HVM_VALID_DISK_TYPES = frozenset([HT_DISK_PARAVIRTUAL, HT_DISK_IOEMU])
HT_DISK_SCSI,
HT_DISK_SD,
HT_DISK_MTD,
- HT_DISK_PFLASH
+ HT_DISK_PFLASH,
])
# Mouse types:
HT_BO_FLOPPY,
HT_BO_CDROM,
HT_BO_DISK,
- HT_BO_NETWORK
+ HT_BO_NETWORK,
])
# SPICE lossless image compression options
(CV_TNODE, "ENODEOOBPATH", "Invalid Out Of Band path")
CV_ENODEUSERSCRIPTS = \
(CV_TNODE, "ENODEUSERSCRIPTS", "User scripts not present or not executable")
+CV_ENODEFILESTORAGEPATHS = \
+ (CV_TNODE, "ENODEFILESTORAGEPATHS", "Detected bad file storage paths")
CV_ALL_ECODES = frozenset([
CV_ECLUSTERCFG,
CV_ENODETIME,
CV_ENODEOOBPATH,
CV_ENODEUSERSCRIPTS,
+ CV_ENODEFILESTORAGEPATHS,
])
CV_ALL_ECODES_STRINGS = frozenset(estr for (_, estr, _) in CV_ALL_ECODES)
NV_OOB_PATHS = "oob-paths"
NV_BRIDGES = "bridges"
NV_USERSCRIPTS = "user-scripts"
+NV_FILE_STORAGE_PATHS = "file-storage-paths"
# Instance status
INSTST_RUNNING = "running"
IALLOCATOR_MODE_RELOC = "relocate"
IALLOCATOR_MODE_CHG_GROUP = "change-group"
IALLOCATOR_MODE_NODE_EVAC = "node-evacuate"
+IALLOCATOR_MODE_MULTI_ALLOC = "multi-allocate"
VALID_IALLOCATOR_MODES = frozenset([
IALLOCATOR_MODE_ALLOC,
IALLOCATOR_MODE_RELOC,
IALLOCATOR_MODE_CHG_GROUP,
IALLOCATOR_MODE_NODE_EVAC,
+ IALLOCATOR_MODE_MULTI_ALLOC,
])
IALLOCATOR_SEARCH_PATH = _autoconf.IALLOCATOR_SEARCH_PATH
+DEFAULT_IALLOCATOR_SHORTCUT = "."
IALLOCATOR_NEVAC_PRI = "primary-only"
IALLOCATOR_NEVAC_SEC = "secondary-only"
# Job queue
JOB_QUEUE_VERSION = 1
-JOB_QUEUE_LOCK_FILE = QUEUE_DIR + "/lock"
-JOB_QUEUE_VERSION_FILE = QUEUE_DIR + "/version"
-JOB_QUEUE_SERIAL_FILE = QUEUE_DIR + "/serial"
-JOB_QUEUE_ARCHIVE_DIR = QUEUE_DIR + "/archive"
-JOB_QUEUE_DRAIN_FILE = QUEUE_DIR + "/drain"
JOB_QUEUE_SIZE_HARD_LIMIT = 5000
JOB_ID_TEMPLATE = r"\d+"
JOB_STATUS_CANCELED = "canceled"
JOB_STATUS_SUCCESS = "success"
JOB_STATUS_ERROR = "error"
+JOBS_PENDING = frozenset([
+ JOB_STATUS_QUEUED,
+ JOB_STATUS_WAITING,
+ JOB_STATUS_CANCELING,
+ ])
JOBS_FINALIZED = frozenset([
JOB_STATUS_CANCELED,
JOB_STATUS_SUCCESS,
JOB_STATUS_ERROR,
])
JOB_STATUS_ALL = frozenset([
- JOB_STATUS_QUEUED,
- JOB_STATUS_WAITING,
- JOB_STATUS_CANCELING,
JOB_STATUS_RUNNING,
- ]) | JOBS_FINALIZED
+ ]) | JOBS_PENDING | JOBS_FINALIZED
# OpCode status
# not yet finalized
OPS_FINALIZED = frozenset([
OP_STATUS_CANCELED,
OP_STATUS_SUCCESS,
- OP_STATUS_ERROR
+ OP_STATUS_ERROR,
])
# OpCode priority
QR_OS = "os"
QR_JOB = "job"
QR_EXPORT = "export"
+QR_NETWORK = "network"
#: List of resources which can be queried using L{opcodes.OpQuery}
QR_VIA_OP = frozenset([
QR_GROUP,
QR_OS,
QR_EXPORT,
+ QR_NETWORK,
])
#: List of resources which can be queried using Local UniX Interface
SS_MAINTAIN_NODE_HEALTH = "maintain_node_health"
SS_UID_POOL = "uid_pool"
SS_NODEGROUPS = "nodegroups"
+SS_NETWORKS = "networks"
SS_FILE_PERMS = 0444
HV_BLOCKDEV_PREFIX: "sd",
HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
HV_CPU_MASK: CPU_PINNING_ALL,
+ HV_CPU_CAP: 0,
+ HV_CPU_WEIGHT: 256,
},
HT_XEN_HVM: {
HV_BOOT_ORDER: "cd",
HV_NIC_TYPE: HT_NIC_RTL8139,
HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
HV_VNC_BIND_ADDRESS: IP4_ADDRESS_ANY,
- HV_VNC_PASSWORD_FILE: VNC_PASSWORD_FILE,
+ HV_VNC_PASSWORD_FILE: pathutils.VNC_PASSWORD_FILE,
HV_ACPI: True,
HV_PAE: True,
HV_KERNEL_PATH: "/usr/lib/xen/boot/hvmloader",
HV_PASSTHROUGH: "",
HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
HV_CPU_MASK: CPU_PINNING_ALL,
+ HV_CPU_CAP: 0,
+ HV_CPU_WEIGHT: 256,
},
HT_KVM: {
HV_KERNEL_PATH: KVM_KERNEL,
HV_CPU_MASK: CPU_PINNING_ALL,
HV_CPU_TYPE: "",
},
- HT_FAKE: {
- },
+ HT_FAKE: {},
HT_CHROOT: {
HV_INIT_SCRIPT: "/ganeti-chroot",
},
LD_LV: {
LDP_STRIPES: _autoconf.LVM_STRIPECOUNT
},
- LD_FILE: {
- },
- LD_BLOCKDEV: {
- },
+ LD_FILE: {},
+ LD_BLOCKDEV: {},
LD_RBD: {
LDP_POOL: "rbd"
},
DRBD_MAX_RATE: _DRBD_DEFAULTS[LDP_MAX_RATE],
DRBD_MIN_RATE: _DRBD_DEFAULTS[LDP_MIN_RATE],
},
- DT_DISKLESS: {
- },
- DT_FILE: {
- },
- DT_SHARED_FILE: {
- },
- DT_BLOCK: {
- },
+ DT_DISKLESS: {},
+ DT_FILE: {},
+ DT_SHARED_FILE: {},
+ DT_BLOCK: {},
DT_RBD: {
RBD_POOL: DISK_LD_DEFAULTS[LD_RBD][LDP_POOL]
},
FAKE_OP_MASTER_TURNUP = "OP_CLUSTER_IP_TURNUP"
FAKE_OP_MASTER_TURNDOWN = "OP_CLUSTER_IP_TURNDOWN"
+# SSH key types
+SSHK_RSA = "rsa"
+SSHK_DSA = "dsa"
+SSHK_ALL = frozenset([SSHK_RSA, SSHK_DSA])
+
+# SSH authorized key types
+SSHAK_RSA = "ssh-rsa"
+SSHAK_DSS = "ssh-dss"
+SSHAK_ALL = frozenset([SSHAK_RSA, SSHAK_DSS])
+
+# SSH setup
+SSHS_CLUSTER_NAME = "cluster_name"
+SSHS_SSH_HOST_KEY = "ssh_host_key"
+SSHS_SSH_ROOT_KEY = "ssh_root_key"
+SSHS_NODE_DAEMON_CERTIFICATE = "node_daemon_certificate"
+
+#: Key files for SSH daemon
+SSH_DAEMON_KEYFILES = {
+ SSHK_RSA: (pathutils.SSH_HOST_RSA_PRIV, pathutils.SSH_HOST_RSA_PUB),
+ SSHK_DSA: (pathutils.SSH_HOST_DSA_PRIV, pathutils.SSH_HOST_DSA_PUB),
+ }
+
+# Node daemon setup
+NDS_CLUSTER_NAME = "cluster_name"
+NDS_NODE_DAEMON_CERTIFICATE = "node_daemon_certificate"
+NDS_SSCONF = "ssconf"
+NDS_START_NODE_DAEMON = "start_node_daemon"
+
# Do not re-export imported modules
-del re, _vcsversion, _autoconf, socket
+del re, _vcsversion, _autoconf, socket, pathutils