# user separation
DAEMONS_GROUP = _autoconf.DAEMONS_GROUP
+ADMIN_GROUP = _autoconf.ADMIN_GROUP
MASTERD_USER = _autoconf.MASTERD_USER
+MASTERD_GROUP = _autoconf.MASTERD_GROUP
RAPI_USER = _autoconf.RAPI_USER
+RAPI_GROUP = _autoconf.RAPI_GROUP
+CONFD_USER = _autoconf.CONFD_USER
+CONFD_GROUP = _autoconf.CONFD_GROUP
+NODED_USER = _autoconf.NODED_USER
+
+
+# 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"
INISECT_OSP = "os"
# dynamic device modification
-DDM_ADD = 'add'
-DDM_REMOVE = 'remove'
+DDM_ADD = "add"
+DDM_REMOVE = "remove"
+DDMS_VALUES = frozenset([DDM_ADD, DDM_REMOVE])
# common exit codes
EXIT_SUCCESS = 0
HV_VHOST_NET = "vhost_net"
HV_KVM_USE_CHROOT = "use_chroot"
HV_CPU_MASK = "cpu_mask"
+HV_MEM_PATH = "mem_path"
HVS_PARAMETER_TYPES = {
HV_BOOT_ORDER: VTYPE_STRING,
HV_VHOST_NET: VTYPE_BOOL,
HV_KVM_USE_CHROOT: VTYPE_BOOL,
HV_CPU_MASK: VTYPE_STRING,
+ HV_MEM_PATH: VTYPE_STRING,
}
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
JOB_STATUS_SUCCESS,
JOB_STATUS_ERROR,
])
+JOB_STATUS_ALL = frozenset([
+ JOB_STATUS_QUEUED,
+ JOB_STATUS_WAITLOCK,
+ JOB_STATUS_CANCELING,
+ JOB_STATUS_RUNNING,
+ ]) | JOBS_FINALIZED
# OpCode status
# not yet finalized
OP_STATUS_SUCCESS,
OP_STATUS_ERROR])
+# OpCode priority
+OP_PRIO_LOWEST = +19
+OP_PRIO_HIGHEST = -20
+
+OP_PRIO_LOW = +10
+OP_PRIO_NORMAL = 0
+OP_PRIO_HIGH = -10
+
+OP_PRIO_SUBMIT_VALID = frozenset([
+ OP_PRIO_LOW,
+ OP_PRIO_NORMAL,
+ OP_PRIO_HIGH,
+ ])
+
+OP_PRIO_DEFAULT = OP_PRIO_NORMAL
+
# Execution log types
ELOG_MESSAGE = "message"
ELOG_PROGRESS = "progress"
SS_HYPERVISOR_LIST = "hypervisor_list"
SS_MAINTAIN_NODE_HEALTH = "maintain_node_health"
SS_UID_POOL = "uid_pool"
+SS_NODEGROUPS = "nodegroups"
# cluster wide default parameters
DEFAULT_ENABLED_HYPERVISOR = HT_XEN_PVM
HV_KVM_FLAG: "",
HV_VHOST_NET: False,
HV_KVM_USE_CHROOT: False,
+ HV_MEM_PATH: "",
},
HT_FAKE: {
},