import re
from ganeti import _autoconf
+from ganeti import _vcsversion
# various versions
RELEASE_VERSION = _autoconf.PACKAGE_VERSION
OS_API_V15 = 15
OS_API_V20 = 20
OS_API_VERSIONS = frozenset([OS_API_V10, OS_API_V15, OS_API_V20])
-VCS_VERSION = _autoconf.VCS_VERSION
+VCS_VERSION = _vcsversion.VCS_VERSION
EXPORT_VERSION = 0
RAPI_VERSION = 2
NODED_USER = _autoconf.NODED_USER
NODED_GROUP = _autoconf.NODED_GROUP
+# cpu pinning separators and constants
+CPU_PINNING_SEP = ":"
+CPU_PINNING_ALL = "all"
+# internal representation of "all"
+CPU_PINNING_ALL_VAL = -1
+
+# A Xen-specific implementation detail - there is no way to actually say
+# "use any cpu for pinning" in a Xen configuration file, as opposed to the
+# command line, where you can say "xm vcpu-pin <domain> <vcpu> all".
+# The workaround used in Xen is "0-63" (see source code function
+# xm_vcpu_pin in <xen-source>/tools/python/xen/xm/main.py).
+# To support future changes, the following constant is treated as a
+# blackbox string that simply means use-any-cpu-for-pinning-under-xen.
+CPU_PINNING_ALL_XEN = "0-63"
# Wipe
DD_CMD = "dd"
-WIPE_BLOCK_SIZE = 1024**2
+WIPE_BLOCK_SIZE = 1024 ** 2
MAX_WIPE_CHUNK = 1024 # 1GB
MIN_WIPE_CHUNK_PERCENT = 10
ADOPTABLE_BLOCKDEV_ROOT = "/dev/disk/"
# keep RUN_GANETI_DIR first here, to make sure all get created when the node
# daemon is started (this takes care of RUN_DIR being tmpfs)
-SUB_RUN_DIRS = [ RUN_GANETI_DIR, BDEV_CACHE_DIR, DISK_LINKS_DIR ]
+SUB_RUN_DIRS = [
+ RUN_GANETI_DIR,
+ BDEV_CACHE_DIR,
+ DISK_LINKS_DIR,
+ ]
LOCK_DIR = _autoconf.LOCALSTATEDIR + "/lock"
SSCONF_LOCK_FILE = LOCK_DIR + "/ganeti-ssconf.lock"
# User-id pool lock directory
RAPI_CERT_FILE = DATA_DIR + "/rapi.pem"
CONFD_HMAC_KEY = DATA_DIR + "/hmac.key"
CLUSTER_DOMAIN_SECRET_FILE = DATA_DIR + "/cluster-domain-secret"
-WATCHER_STATEFILE = DATA_DIR + "/watcher.data"
-WATCHER_PAUSEFILE = DATA_DIR + "/watcher.pause"
-INSTANCE_UPFILE = RUN_GANETI_DIR + "/instance-status"
+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 + "/kvm-console-wrapper"
-XM_CONSOLE_WRAPPER = _autoconf.PKGLIBDIR + "/xm-console-wrapper"
+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
TOOLSDIR = _autoconf.TOOLSDIR
CONF_DIR = SYSCONFDIR + "/ganeti"
+#: 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"
+
ALL_CERT_FILES = frozenset([NODED_CERT_FILE, RAPI_CERT_FILE])
MASTER_SOCKET = SOCKET_DIR + "/ganeti-master"
LUXI_EOM = "\3"
LUXI_VERSION = CONFIG_VERSION
-# one of 'no', 'yes', 'only'
+# one of "no", "yes", "only"
SYSLOG_USAGE = _autoconf.SYSLOG_USAGE
SYSLOG_NO = "no"
SYSLOG_YES = "yes"
SO_FIX_CONSISTENCY = "fix-consistency"
# Available fields per storage type
-VALID_STORAGE_FIELDS = frozenset([SF_NAME, SF_TYPE, SF_SIZE,
- SF_USED, SF_FREE, SF_ALLOCATABLE])
+VALID_STORAGE_FIELDS = frozenset([
+ SF_NAME,
+ SF_TYPE,
+ SF_SIZE,
+ SF_USED,
+ SF_FREE,
+ SF_ALLOCATABLE
+ ])
VALID_STORAGE_TYPES = frozenset([ST_FILE, ST_LVM_PV, ST_LVM_VG])
])
# Lock recalculate mode
-LOCKS_REPLACE = 'replace'
-LOCKS_APPEND = 'append'
+LOCKS_REPLACE = "replace"
+LOCKS_APPEND = "append"
# Lock timeout (sum) before we should go into blocking acquire (still
# can be reset by priority change); computed as max time (10 hours)
#: Give child process up to 5 seconds to exit after sending a signal
CHILD_LINGER_TIMEOUT = 5.0
-DISK_TEMPLATES = frozenset([DT_DISKLESS, DT_PLAIN, DT_DRBD8,
- DT_FILE, DT_SHARED_FILE, DT_BLOCK])
+DISK_TEMPLATES = frozenset([
+ DT_DISKLESS,
+ DT_PLAIN,
+ DT_DRBD8,
+ DT_FILE,
+ DT_SHARED_FILE,
+ DT_BLOCK
+ ])
FILE_DRIVER = frozenset([FD_LOOP, FD_BLKTAP])
IP6_ADDRESS_ANY = "::"
IP4_VERSION = 4
IP6_VERSION = 6
+VALID_IP_VERSIONS = frozenset([IP4_VERSION, IP6_VERSION])
TCP_PING_TIMEOUT = 10
GANETI_RUNAS = "root"
DEFAULT_VG = "xenvg"
DISK_TRANSFER_CONNECT_TIMEOUT = 60
# Disk index separator
DISK_SEPARATOR = _autoconf.DISK_SEPARATOR
+IP_COMMAND_PATH = _autoconf.IP_PATH
#: Key for job IDs in opcode result
JOB_IDS_KEY = "jobs"
RPC_ENCODING_ZLIB_BASE64) = range(2)
# os related constants
-OS_SCRIPT_CREATE = 'create'
-OS_SCRIPT_IMPORT = 'import'
-OS_SCRIPT_EXPORT = 'export'
-OS_SCRIPT_RENAME = 'rename'
-OS_SCRIPT_VERIFY = 'verify'
-OS_SCRIPTS = frozenset([OS_SCRIPT_CREATE, OS_SCRIPT_IMPORT,
- OS_SCRIPT_EXPORT, OS_SCRIPT_RENAME,
- OS_SCRIPT_VERIFY])
-
-OS_API_FILE = 'ganeti_api_version'
-OS_VARIANTS_FILE = 'variants.list'
-OS_PARAMETERS_FILE = 'parameters.list'
-
-OS_VALIDATE_PARAMETERS = 'parameters'
+OS_SCRIPT_CREATE = "create"
+OS_SCRIPT_IMPORT = "import"
+OS_SCRIPT_EXPORT = "export"
+OS_SCRIPT_RENAME = "rename"
+OS_SCRIPT_VERIFY = "verify"
+OS_SCRIPTS = frozenset([
+ OS_SCRIPT_CREATE,
+ OS_SCRIPT_IMPORT,
+ OS_SCRIPT_EXPORT,
+ OS_SCRIPT_RENAME,
+ OS_SCRIPT_VERIFY
+ ])
+
+OS_API_FILE = "ganeti_api_version"
+OS_VARIANTS_FILE = "variants.list"
+OS_PARAMETERS_FILE = "parameters.list"
+
+OS_VALIDATE_PARAMETERS = "parameters"
OS_VALIDATE_CALLS = frozenset([OS_VALIDATE_PARAMETERS])
# ssh constants
INSTANCE_REBOOT_HARD = "hard"
INSTANCE_REBOOT_FULL = "full"
-REBOOT_TYPES = frozenset([INSTANCE_REBOOT_SOFT,
- INSTANCE_REBOOT_HARD,
- INSTANCE_REBOOT_FULL])
+REBOOT_TYPES = frozenset([
+ INSTANCE_REBOOT_SOFT,
+ INSTANCE_REBOOT_HARD,
+ INSTANCE_REBOOT_FULL
+ ])
+
+# instance reboot behaviors
+INSTANCE_REBOOT_ALLOWED = "reboot"
+INSTANCE_REBOOT_EXIT = "exit"
-VTYPE_STRING = 'string'
+REBOOT_BEHAVIORS = frozenset([
+ INSTANCE_REBOOT_ALLOWED,
+ INSTANCE_REBOOT_EXIT
+ ])
+
+VTYPE_STRING = "string"
VTYPE_MAYBE_STRING = "maybe-string"
-VTYPE_BOOL = 'bool'
-VTYPE_SIZE = 'size' # size, in MiBs
-VTYPE_INT = 'int'
+VTYPE_BOOL = "bool"
+VTYPE_SIZE = "size" # size, in MiBs
+VTYPE_INT = "int"
ENFORCEABLE_TYPES = frozenset([
- VTYPE_STRING,
- VTYPE_MAYBE_STRING,
- VTYPE_BOOL,
- VTYPE_SIZE,
- VTYPE_INT,
- ])
+ VTYPE_STRING,
+ VTYPE_MAYBE_STRING,
+ VTYPE_BOOL,
+ VTYPE_SIZE,
+ VTYPE_INT,
+ ])
+
+# Constant representing that the user does not specify any IP version
+IFACE_NO_IP_VERSION_SPECIFIED = 0
# HV parameter names (global namespace)
HV_BOOT_ORDER = "boot_order"
HV_VNC_TLS = "vnc_tls"
HV_VNC_X509 = "vnc_x509_path"
HV_VNC_X509_VERIFY = "vnc_x509_verify"
+HV_KVM_SPICE_BIND = "spice_bind"
+HV_KVM_SPICE_IP_VERSION = "spice_ip_version"
HV_ACPI = "acpi"
HV_PAE = "pae"
HV_USE_BOOTLOADER = "use_bootloader"
HV_ROOT_PATH = "root_path"
HV_SERIAL_CONSOLE = "serial_console"
HV_USB_MOUSE = "usb_mouse"
+HV_KEYMAP = "keymap"
HV_DEVICE_MODEL = "device_model"
HV_INIT_SCRIPT = "init_script"
HV_MIGRATION_PORT = "migration_port"
HV_CPU_MASK = "cpu_mask"
HV_MEM_PATH = "mem_path"
HV_BLOCKDEV_PREFIX = "blockdev_prefix"
+HV_REBOOT_BEHAVIOR = "reboot_behavior"
HVS_PARAMETER_TYPES = {
HV_BOOT_ORDER: VTYPE_STRING,
HV_VNC_TLS: VTYPE_BOOL,
HV_VNC_X509: VTYPE_STRING,
HV_VNC_X509_VERIFY: VTYPE_BOOL,
+ HV_KVM_SPICE_BIND: VTYPE_STRING,
+ HV_KVM_SPICE_IP_VERSION: VTYPE_INT,
HV_ACPI: VTYPE_BOOL,
HV_PAE: VTYPE_BOOL,
HV_USE_BOOTLOADER: VTYPE_BOOL,
HV_ROOT_PATH: VTYPE_MAYBE_STRING,
HV_SERIAL_CONSOLE: VTYPE_BOOL,
HV_USB_MOUSE: VTYPE_STRING,
+ HV_KEYMAP: VTYPE_STRING,
HV_DEVICE_MODEL: VTYPE_STRING,
HV_INIT_SCRIPT: VTYPE_STRING,
HV_MIGRATION_PORT: VTYPE_INT,
HV_CPU_MASK: VTYPE_STRING,
HV_MEM_PATH: VTYPE_STRING,
HV_BLOCKDEV_PREFIX: VTYPE_STRING,
+ HV_REBOOT_BEHAVIOR: VTYPE_STRING,
}
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
OOB_POWER_STATUS = "power-status"
OOB_HEALTH = "health"
-OOB_COMMANDS = frozenset([OOB_POWER_ON, OOB_POWER_OFF, OOB_POWER_CYCLE,
- OOB_POWER_STATUS, OOB_HEALTH])
+OOB_COMMANDS = frozenset([
+ OOB_POWER_ON,
+ OOB_POWER_OFF,
+ OOB_POWER_CYCLE,
+ OOB_POWER_STATUS,
+ OOB_HEALTH
+ ])
OOB_POWER_STATUS_POWERED = "powered"
HT_NIC_E1000 = "e1000"
HT_NIC_PARAVIRTUAL = HT_DISK_PARAVIRTUAL = "paravirtual"
-HT_HVM_VALID_NIC_TYPES = frozenset([HT_NIC_RTL8139, HT_NIC_NE2K_PCI,
- HT_NIC_E1000, HT_NIC_NE2K_ISA,
- HT_NIC_PARAVIRTUAL])
-HT_KVM_VALID_NIC_TYPES = frozenset([HT_NIC_RTL8139, HT_NIC_NE2K_PCI,
- HT_NIC_NE2K_ISA, HT_NIC_I82551,
- HT_NIC_I85557B, HT_NIC_I8259ER,
- HT_NIC_PCNET, HT_NIC_E1000,
- HT_NIC_PARAVIRTUAL])
+HT_HVM_VALID_NIC_TYPES = frozenset([
+ HT_NIC_RTL8139,
+ HT_NIC_NE2K_PCI,
+ HT_NIC_E1000,
+ HT_NIC_NE2K_ISA,
+ HT_NIC_PARAVIRTUAL
+ ])
+HT_KVM_VALID_NIC_TYPES = frozenset([
+ HT_NIC_RTL8139,
+ HT_NIC_NE2K_PCI,
+ HT_NIC_NE2K_ISA,
+ HT_NIC_I82551,
+ HT_NIC_I85557B,
+ HT_NIC_I8259ER,
+ HT_NIC_PCNET,
+ HT_NIC_E1000,
+ HT_NIC_PARAVIRTUAL
+ ])
+
# Disk types
HT_DISK_IOEMU = "ioemu"
HT_DISK_IDE = "ide"
HT_CACHE_NONE = "none"
HT_CACHE_WTHROUGH = "writethrough"
HT_CACHE_WBACK = "writeback"
-HT_VALID_CACHE_TYPES = frozenset([HT_CACHE_DEFAULT,
- HT_CACHE_NONE,
- HT_CACHE_WTHROUGH,
- HT_CACHE_WBACK])
+HT_VALID_CACHE_TYPES = frozenset([
+ HT_CACHE_DEFAULT,
+ HT_CACHE_NONE,
+ HT_CACHE_WTHROUGH,
+ HT_CACHE_WBACK
+ ])
HT_HVM_VALID_DISK_TYPES = frozenset([HT_DISK_PARAVIRTUAL, HT_DISK_IOEMU])
-HT_KVM_VALID_DISK_TYPES = frozenset([HT_DISK_PARAVIRTUAL, HT_DISK_IDE,
- HT_DISK_SCSI, HT_DISK_SD, HT_DISK_MTD,
- HT_DISK_PFLASH])
+HT_KVM_VALID_DISK_TYPES = frozenset([
+ HT_DISK_PARAVIRTUAL,
+ HT_DISK_IDE,
+ HT_DISK_SCSI,
+ HT_DISK_SD,
+ HT_DISK_MTD,
+ HT_DISK_PFLASH
+ ])
# Mouse types:
HT_MOUSE_MOUSE = "mouse"
HT_BO_DISK = "disk"
HT_BO_NETWORK = "network"
-HT_KVM_VALID_BO_TYPES = frozenset([HT_BO_FLOPPY, HT_BO_CDROM,
- HT_BO_DISK, HT_BO_NETWORK])
+HT_KVM_VALID_BO_TYPES = frozenset([
+ HT_BO_FLOPPY,
+ HT_BO_CDROM,
+ HT_BO_DISK,
+ HT_BO_NETWORK
+ ])
# Security models
HT_SM_NONE = "none"
HT_MIGRATION_MODES = frozenset([HT_MIGRATION_LIVE, HT_MIGRATION_NONLIVE])
# Cluster Verify steps
-VERIFY_NPLUSONE_MEM = 'nplusone_mem'
+VERIFY_NPLUSONE_MEM = "nplusone_mem"
VERIFY_OPTIONAL_CHECKS = frozenset([VERIFY_NPLUSONE_MEM])
# Node verify constants
])
IALLOCATOR_MODE_ALLOC = "allocate"
IALLOCATOR_MODE_RELOC = "relocate"
-IALLOCATOR_MODE_MEVAC = "multi-evacuate"
-IALLOCATOR_MODE_MRELOC = "multi-relocate"
IALLOCATOR_MODE_CHG_GROUP = "change-group"
IALLOCATOR_MODE_NODE_EVAC = "node-evacuate"
VALID_IALLOCATOR_MODES = frozenset([
IALLOCATOR_MODE_ALLOC,
IALLOCATOR_MODE_RELOC,
- IALLOCATOR_MODE_MEVAC,
- IALLOCATOR_MODE_MRELOC,
IALLOCATOR_MODE_CHG_GROUP,
IALLOCATOR_MODE_NODE_EVAC,
])
IALLOCATOR_NEVAC_ALL,
])
-# TODO: Remove multi-relocate constants, including IALLOCATOR_MODE_MRELOC
-IALLOCATOR_MRELOC_ANY = "any_group"
-IALLOCATOR_MRELOC_CHANGE = "change_group"
-IALLOCATOR_MRELOC_KEEP = "keep_group"
-IALLOCATOR_MRELOC_MODES = frozenset([
- IALLOCATOR_MRELOC_ANY,
- IALLOCATOR_MRELOC_CHANGE,
- IALLOCATOR_MRELOC_KEEP,
- ])
-
# Job queue
JOB_QUEUE_VERSION = 1
JOB_QUEUE_LOCK_FILE = QUEUE_DIR + "/lock"
JOB_QUEUE_DIRS_MODE = SECURE_DIR_MODE
JOB_ID_TEMPLATE = r"\d+"
+JOB_FILE_RE = re.compile(r"^job-(%s)$" % JOB_ID_TEMPLATE)
# unchanged job return
JOB_NOTCHANGED = "nochange"
# Job status
JOB_STATUS_QUEUED = "queued"
-JOB_STATUS_WAITLOCK = "waiting"
+JOB_STATUS_WAITING = "waiting"
JOB_STATUS_CANCELING = "canceling"
JOB_STATUS_RUNNING = "running"
JOB_STATUS_CANCELED = "canceled"
])
JOB_STATUS_ALL = frozenset([
JOB_STATUS_QUEUED,
- JOB_STATUS_WAITLOCK,
+ JOB_STATUS_WAITING,
JOB_STATUS_CANCELING,
JOB_STATUS_RUNNING,
]) | JOBS_FINALIZED
# OpCode status
# not yet finalized
OP_STATUS_QUEUED = "queued"
-OP_STATUS_WAITLOCK = "waiting"
+OP_STATUS_WAITING = "waiting"
OP_STATUS_CANCELING = "canceling"
OP_STATUS_RUNNING = "running"
# finalized
OP_STATUS_CANCELED = "canceled"
OP_STATUS_SUCCESS = "success"
OP_STATUS_ERROR = "error"
-OPS_FINALIZED = frozenset([OP_STATUS_CANCELED,
- OP_STATUS_SUCCESS,
- OP_STATUS_ERROR])
+OPS_FINALIZED = frozenset([
+ OP_STATUS_CANCELED,
+ OP_STATUS_SUCCESS,
+ OP_STATUS_ERROR
+ ])
# OpCode priority
OP_PRIO_LOWEST = +19
#: Dictionary with special field cases and their verbose/terse formatting
RSS_DESCRIPTION = {
RS_UNKNOWN: ("(unknown)", "??"),
- RS_NODATA: ("(nodata)", "?"),
+ RS_NODATA: ("(nodata)", "?"),
RS_OFFLINE: ("(offline)", "*"),
RS_UNAVAIL: ("(unavail)", "-"),
}
SS_UID_POOL = "uid_pool"
SS_NODEGROUPS = "nodegroups"
+SS_FILE_PERMS = 0444
+
# cluster wide default parameters
DEFAULT_ENABLED_HYPERVISOR = HT_XEN_PVM
HT_XEN_PVM: {
HV_USE_BOOTLOADER: False,
HV_BOOTLOADER_PATH: XEN_BOOTLOADER,
- HV_BOOTLOADER_ARGS: '',
+ HV_BOOTLOADER_ARGS: "",
HV_KERNEL_PATH: "/boot/vmlinuz-2.6-xenU",
- HV_INITRD_PATH: '',
- HV_ROOT_PATH: '/dev/sda1',
- HV_KERNEL_ARGS: 'ro',
+ HV_INITRD_PATH: "",
+ HV_ROOT_PATH: "/dev/sda1",
+ HV_KERNEL_ARGS: "ro",
HV_MIGRATION_PORT: 8002,
HV_MIGRATION_MODE: HT_MIGRATION_LIVE,
HV_BLOCKDEV_PREFIX: "sd",
+ HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
+ HV_CPU_MASK: CPU_PINNING_ALL,
},
HT_XEN_HVM: {
HV_BOOT_ORDER: "cd",
- HV_CDROM_IMAGE_PATH: '',
+ HV_CDROM_IMAGE_PATH: "",
HV_NIC_TYPE: HT_NIC_RTL8139,
HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
HV_VNC_BIND_ADDRESS: IP4_ADDRESS_ANY,
HV_MIGRATION_MODE: HT_MIGRATION_NONLIVE,
HV_USE_LOCALTIME: False,
HV_BLOCKDEV_PREFIX: "hd",
+ HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
+ HV_CPU_MASK: CPU_PINNING_ALL,
},
HT_KVM: {
HV_KERNEL_PATH: "/boot/vmlinuz-2.6-kvmU",
- HV_INITRD_PATH: '',
- HV_KERNEL_ARGS: 'ro',
- HV_ROOT_PATH: '/dev/vda1',
+ HV_INITRD_PATH: "",
+ HV_KERNEL_ARGS: "ro",
+ HV_ROOT_PATH: "/dev/vda1",
HV_ACPI: True,
HV_SERIAL_CONSOLE: True,
- HV_VNC_BIND_ADDRESS: '',
+ HV_VNC_BIND_ADDRESS: "",
HV_VNC_TLS: False,
- HV_VNC_X509: '',
+ HV_VNC_X509: "",
HV_VNC_X509_VERIFY: False,
- HV_VNC_PASSWORD_FILE: '',
- HV_KVM_FLOPPY_IMAGE_PATH: '',
- HV_CDROM_IMAGE_PATH: '',
- HV_KVM_CDROM2_IMAGE_PATH: '',
+ HV_VNC_PASSWORD_FILE: "",
+ HV_KVM_SPICE_BIND: "",
+ HV_KVM_SPICE_IP_VERSION: IFACE_NO_IP_VERSION_SPECIFIED,
+ HV_KVM_FLOPPY_IMAGE_PATH: "",
+ HV_CDROM_IMAGE_PATH: "",
+ HV_KVM_CDROM2_IMAGE_PATH: "",
HV_BOOT_ORDER: HT_BO_DISK,
HV_NIC_TYPE: HT_NIC_PARAVIRTUAL,
HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
- HV_KVM_CDROM_DISK_TYPE: '',
- HV_USB_MOUSE: '',
+ HV_KVM_CDROM_DISK_TYPE: "",
+ HV_USB_MOUSE: "",
+ HV_KEYMAP: "",
HV_MIGRATION_PORT: 8102,
HV_MIGRATION_BANDWIDTH: 32, # MiB/s
HV_MIGRATION_DOWNTIME: 30, # ms
HV_USE_LOCALTIME: False,
HV_DISK_CACHE: HT_CACHE_DEFAULT,
HV_SECURITY_MODEL: HT_SM_NONE,
- HV_SECURITY_DOMAIN: '',
+ HV_SECURITY_DOMAIN: "",
HV_KVM_FLAG: "",
HV_VHOST_NET: False,
HV_KVM_USE_CHROOT: False,
HV_MEM_PATH: "",
+ HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
+ HV_CPU_MASK: CPU_PINNING_ALL,
},
HT_FAKE: {
},
# This allows us to distinguish different types of confd protocols and handle
# them. For example by changing this we can move the whole payload to be
# compressed, or move away from json.
-CONFD_MAGIC_FOURCC = 'plj0'
+CONFD_MAGIC_FOURCC = "plj0"
# By default a confd request is sent to the minimum between this number and all
# MCs. 6 was chosen because even in the case of a disastrous 50% response rate,
# User-id pool minimum/maximum acceptable user-ids.
UIDPOOL_UID_MIN = 0
-UIDPOOL_UID_MAX = 2**32-1 # Assuming 32 bit user-ids
+UIDPOOL_UID_MAX = 2 ** 32 - 1 # Assuming 32 bit user-ids
# Name or path of the pgrep command
PGREP = "pgrep"