HVST_CPU_TOTAL = "cpu_total"
HVST_CPU_NODE = "cpu_node"
+HVST_DEFAULTS = {
+ HVST_MEMORY_TOTAL: 0,
+ HVST_MEMORY_NODE: 0,
+ HVST_MEMORY_HV: 0,
+ HVST_CPU_TOTAL: 1,
+ HVST_CPU_NODE: 1,
+ }
+
HVSTS_PARAMETER_TYPES = {
HVST_MEMORY_TOTAL: VTYPE_INT,
HVST_MEMORY_NODE: VTYPE_INT,
DS_DISK_RESERVED = "disk_reserved"
DS_DISK_OVERHEAD = "disk_overhead"
+DS_DEFAULTS = {
+ DS_DISK_TOTAL: 0,
+ DS_DISK_RESERVED: 0,
+ DS_DISK_OVERHEAD: 0,
+ }
+
DSS_PARAMETER_TYPES = {
DS_DISK_TOTAL: VTYPE_INT,
DS_DISK_RESERVED: VTYPE_INT,
BE_MINMEM = "minmem"
BE_VCPUS = "vcpus"
BE_AUTO_BALANCE = "auto_balance"
+BE_ALWAYS_FAILOVER = "always_failover"
BES_PARAMETER_TYPES = {
BE_MAXMEM: VTYPE_SIZE,
BE_MINMEM: VTYPE_SIZE,
BE_VCPUS: VTYPE_INT,
BE_AUTO_BALANCE: VTYPE_BOOL,
+ BE_ALWAYS_FAILOVER: VTYPE_BOOL,
}
BES_PARAMETER_COMPAT = {
BES_PARAMETERS = frozenset(BES_PARAMETER_TYPES.keys())
+# instance specs
+MEM_SIZE_SPEC = "memory-size"
+CPU_COUNT_SPEC = "cpu-count"
+DISK_COUNT_SPEC = "disk-count"
+DISK_SIZE_SPEC = "disk-size"
+NIC_COUNT_SPEC = "nic-count"
+
+ISPECS_PARAMETER_TYPES = {
+ MEM_SIZE_SPEC: VTYPE_INT,
+ CPU_COUNT_SPEC: VTYPE_INT,
+ DISK_COUNT_SPEC: VTYPE_INT,
+ DISK_SIZE_SPEC: VTYPE_INT,
+ NIC_COUNT_SPEC: VTYPE_INT,
+ }
+
+ISPECS_PARAMETERS = frozenset(ISPECS_PARAMETER_TYPES.keys())
+
+MIN_ISPECS = "min"
+MAX_ISPECS = "max"
+STD_ISPECS = "std"
+
+IPOLICY_PARAMETERS = frozenset([
+ MIN_ISPECS,
+ MAX_ISPECS,
+ STD_ISPECS
+ ])
+
# Node parameter names
ND_OOB_PROGRAM = "oob_program"
NDS_PARAMETERS = frozenset(NDS_PARAMETER_TYPES.keys())
# Logical Disks parameters
-RESYNC_RATE = "resync-rate"
-STRIPES = "stripes"
-BARRIERS = "disabled-barriers"
-NO_META_FLUSH = "disable-meta-flush"
+LDP_RESYNC_RATE = "resync-rate"
+LDP_STRIPES = "stripes"
+LDP_BARRIERS = "disabled-barriers"
+LDP_NO_META_FLUSH = "disable-meta-flush"
+LDP_DEFAULT_METAVG = "default-metavg"
+LDP_DISK_CUSTOM = "disk-custom"
+LDP_NET_CUSTOM = "net-custom"
DISK_LD_TYPES = {
- RESYNC_RATE: VTYPE_INT,
- STRIPES: VTYPE_INT,
- BARRIERS: VTYPE_STRING,
- NO_META_FLUSH: VTYPE_BOOL,
+ LDP_RESYNC_RATE: VTYPE_INT,
+ LDP_STRIPES: VTYPE_INT,
+ LDP_BARRIERS: VTYPE_STRING,
+ LDP_NO_META_FLUSH: VTYPE_BOOL,
+ LDP_DEFAULT_METAVG: VTYPE_STRING,
+ LDP_DISK_CUSTOM: VTYPE_STRING,
+ LDP_NET_CUSTOM: VTYPE_STRING,
}
DISK_LD_PARAMETERS = frozenset(DISK_LD_TYPES.keys())
DRBD_META_STRIPES = "meta-stripes"
DRBD_DISK_BARRIERS = "disk-barriers"
DRBD_META_BARRIERS = "meta-barriers"
+DRBD_DEFAULT_METAVG = "metavg"
+DRBD_DISK_CUSTOM = "disk-custom"
+DRBD_NET_CUSTOM = "net-custom"
LV_STRIPES = "stripes"
DISK_DT_TYPES = {
DRBD_RESYNC_RATE: VTYPE_INT,
DRBD_META_STRIPES: VTYPE_INT,
DRBD_DISK_BARRIERS: VTYPE_STRING,
DRBD_META_BARRIERS: VTYPE_BOOL,
+ DRBD_DEFAULT_METAVG: VTYPE_STRING,
+ DRBD_DISK_CUSTOM: VTYPE_STRING,
+ DRBD_NET_CUSTOM: VTYPE_STRING,
LV_STRIPES: VTYPE_INT,
}
BE_MAXMEM: 128,
BE_VCPUS: 1,
BE_AUTO_BALANCE: True,
+ BE_ALWAYS_FAILOVER: False,
}
NDC_DEFAULTS = {
DISK_LD_DEFAULTS = {
LD_DRBD8: {
- RESYNC_RATE: CLASSIC_DRBD_SYNC_SPEED,
- BARRIERS: _autoconf.DRBD_BARRIERS,
- NO_META_FLUSH: _autoconf.DRBD_NO_META_FLUSH,
+ LDP_RESYNC_RATE: CLASSIC_DRBD_SYNC_SPEED,
+ LDP_BARRIERS: _autoconf.DRBD_BARRIERS,
+ LDP_NO_META_FLUSH: _autoconf.DRBD_NO_META_FLUSH,
+ LDP_DEFAULT_METAVG: DEFAULT_VG,
+ LDP_DISK_CUSTOM: "",
+ LDP_NET_CUSTOM: "",
},
LD_LV: {
- STRIPES: _autoconf.LVM_STRIPECOUNT
+ LDP_STRIPES: _autoconf.LVM_STRIPECOUNT
},
LD_FILE: {
},
DISK_DT_DEFAULTS = {
DT_PLAIN: {
- LV_STRIPES: DISK_LD_DEFAULTS[LD_LV][STRIPES],
+ LV_STRIPES: DISK_LD_DEFAULTS[LD_LV][LDP_STRIPES],
},
DT_DRBD8: {
- DRBD_RESYNC_RATE: DISK_LD_DEFAULTS[LD_DRBD8][RESYNC_RATE],
- DRBD_DATA_STRIPES: DISK_LD_DEFAULTS[LD_LV][STRIPES],
- DRBD_META_STRIPES: DISK_LD_DEFAULTS[LD_LV][STRIPES],
- DRBD_DISK_BARRIERS: DISK_LD_DEFAULTS[LD_DRBD8][BARRIERS],
- DRBD_META_BARRIERS: DISK_LD_DEFAULTS[LD_DRBD8][NO_META_FLUSH],
+ DRBD_RESYNC_RATE: DISK_LD_DEFAULTS[LD_DRBD8][LDP_RESYNC_RATE],
+ DRBD_DATA_STRIPES: DISK_LD_DEFAULTS[LD_LV][LDP_STRIPES],
+ DRBD_META_STRIPES: DISK_LD_DEFAULTS[LD_LV][LDP_STRIPES],
+ DRBD_DISK_BARRIERS: DISK_LD_DEFAULTS[LD_DRBD8][LDP_BARRIERS],
+ DRBD_META_BARRIERS: DISK_LD_DEFAULTS[LD_DRBD8][LDP_NO_META_FLUSH],
+ DRBD_DEFAULT_METAVG: DISK_LD_DEFAULTS[LD_DRBD8][LDP_DEFAULT_METAVG],
+ DRBD_DISK_CUSTOM: DISK_LD_DEFAULTS[LD_DRBD8][LDP_DISK_CUSTOM],
+ DRBD_NET_CUSTOM: DISK_LD_DEFAULTS[LD_DRBD8][LDP_NET_CUSTOM],
},
DT_DISKLESS: {
},
NIC_LINK: DEFAULT_BRIDGE,
}
+IPOLICY_DEFAULTS = {
+ MIN_ISPECS: {
+ MEM_SIZE_SPEC: 128,
+ CPU_COUNT_SPEC: 1,
+ DISK_COUNT_SPEC: 1,
+ DISK_SIZE_SPEC: 1024,
+ NIC_COUNT_SPEC: 1,
+ },
+ MAX_ISPECS: {
+ MEM_SIZE_SPEC: 128,
+ CPU_COUNT_SPEC: 1,
+ DISK_COUNT_SPEC: 1,
+ DISK_SIZE_SPEC: 1024,
+ NIC_COUNT_SPEC: 1,
+ },
+ STD_ISPECS: {
+ MEM_SIZE_SPEC: 128,
+ CPU_COUNT_SPEC: 1,
+ DISK_COUNT_SPEC: 1,
+ DISK_SIZE_SPEC: 1024,
+ NIC_COUNT_SPEC: 1,
+ }
+ }
+
MASTER_POOL_SIZE_DEFAULT = 10
CONFD_PROTOCOL_VERSION = 1