cubecos

package
v0.0.1-dev-aabf7fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// private tunings
	CubeSysHa                = "cubesys.ha"
	CubeSysController        = "cubesys.controller"
	CubeSysControllerVip     = "cubesys.control.vip"
	CubeSysManagementNetwork = "cubesys.management"
	CubeNetIfAddrPrefix      = "net.if.addr."
	NetIfAddrEth0            = "net.if.addr.eth0"

	// public tunings
	BarbicanDebugEnabled        = "barbican.debug.enabled"
	CephDebugEnabled            = "ceph.debug.enabled"
	CephMirrorMetaSync          = "ceph.mirror.meta.sync"
	CinderBackupAccount         = "cinder.backup.account"
	CinderBackupEndpoint        = "cinder.backup.endpoint"
	CinderBackupOverride        = "cinder.backup.override"
	CinderBackupPool            = "cinder.backup.pool"
	CinderBackupSecret          = "cinder.backup.secret"
	CinderBackupType            = "cinder.backup.type"
	CinderDebugEnabled          = "cinder.debug.enabled"
	CinderExternalAccount       = "cinder.external.%d.account"
	CinderExternalDriver        = "cinder.external.%d.driver"
	CinderExternalEndpoint      = "cinder.external.%d.endpoint"
	CinderExternalName          = "cinder.external.%d.name"
	CinderExternalPool          = "cinder.external.%d.pool"
	CinderExternalSecret        = "cinder.external.%d.secret"
	CubesysAlertLevel           = "cubesys.alert.level"
	CubesysAlertLevelS          = "cubesys.alert.level.%s"
	CubesysConntableMax         = "cubesys.conntable.max"
	CubesysLogDefaultRetention  = "cubesys.log.default.retention"
	CubesysProviderExtra        = "cubesys.provider.extra"
	CyborgDebugEnabled          = "cyborg.debug.enabled"
	DebugEnableCoreDumpS        = "debug.enable_core_dump.%s"
	DebugEnableKdump            = "debug.enable_kdump"
	DebugLevelS                 = "debug.level.%s"
	DebugMaxCoreDump            = "debug.max_core_dump"
	DesignateDebugEnabled       = "designate.debug.enabled"
	GlanceDebugEnabled          = "glance.debug.enabled"
	GlanceExportRp              = "glance.export.rp"
	HeatDebugEnabled            = "heat.debug.enabled"
	InfluxdbCuratorRp           = "influxdb.curator.rp"
	IronicDebugEnabled          = "ironic.debug.enabled"
	IronicDeployServer          = "ironic.deploy.server"
	KapacitorAlertCheckEnabled  = "kapacitor.alert.check.enabled"
	KapacitorAlertCheckEventId  = "kapacitor.alert.check.eventid"
	KapacitorAlertCheckInterval = "kapacitor.alert.check.interval"
	KapacitorAlertExtraPrefix   = "kapacitor.alert.extra.prefix"
	KapacitorAlertFlowBase      = "kapacitor.alert.flow.base"
	KapacitorAlertFlowThreshold = "kapacitor.alert.flow.threshold"
	KapacitorAlertFlowUnit      = "kapacitor.alert.flow.unit"
	KeystoneDebugEnabled        = "keystone.debug.enabled"
	ManilaDebugEnabled          = "manila.debug.enabled"
	ManilaVolumeType            = "manila.volume.type"
	MasakariHostEvacuateAll     = "masakari.host.evacuate_all"
	MasakariWaitPeriod          = "masakari.wait.period"
	MonascaDebugEnabled         = "monasca.debug.enabled"
	MysqlBackupCuratorRp        = "mysql.backup.curator.rp"
	NetIfMtuName                = "net.if.mtu.<name>"
	NetIpv4TcpSyncookies        = "net.ipv4.tcp_syncookies"
	NetLacpDefaultRate          = "net.lacp.default.rate"
	NetLacpDefaultXmit          = "net.lacp.default.xmit"
	NeutronDebugEnabled         = "neutron.debug.enabled"
	NovaControlHostMemory       = "nova.control.host.memory"
	NovaControlHostVcpu         = "nova.control.host.vcpu"
	NovaDebugEnabled            = "nova.debug.enabled"
	NovaGpuType                 = "nova.gpu.type"
	NovaOvercommitCpuRatio      = "nova.overcommit.cpu.ratio"
	NovaOvercommitDiskRatio     = "nova.overcommit.disk.ratio"
	NovaOvercommitRamRatio      = "nova.overcommit.ram.ratio"
	NtpDebugEnabled             = "ntp.debug.enabled"
	OctaviaDebugEnabled         = "octavia.debug.enabled"
	OctaviaHa                   = "octavia.ha"
	OpensearchCuratorRp         = "opensearch.curator.rp"
	OpensearchHeapSize          = "opensearch.heap.size"
	SenlinDebugEnabled          = "senlin.debug.enabled"
	SkylineDebugEnabled         = "skyline.debug.enabled"
	SnapshotApplyAction         = "snapshot.apply.action"
	SnapshotApplyPolicyIgnore   = "snapshot.apply.policy.ignore"
	SshdBindToAllInterfaces     = "sshd.bind_to_all_interfaces"
	SshdSessionInactivity       = "sshd.session.inactivity"
	TimeTimezone                = "time.timezone"
	UpdateSecurityAutoUpdate    = "update.security.autoupdate"
	WatcherDebugEnabled         = "watcher.debug.enabled"
)

Variables

View Source
var (
	BarbicanDebugEnabledSpec = &definition.TuningSpec{
		Name:        BarbicanDebugEnabled,
		Description: "Set to true to enable barbican verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllGeneralRoles,
	}
	CephDebugEnabledSpec = &definition.TuningSpec{
		Name:        CephDebugEnabled,
		Description: "Set to true to enable ceph debug logs.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllGeneralRoles,
	}
	CephMirrorMetaSyncSpec = &definition.TuningSpec{
		Name:        CephMirrorMetaSync,
		Description: "Set to true to enable automatically volume metadata sync.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: true,
		},
		Roles: definition.ControlRoles,
	}
	CinderBackupAccountSpec = &definition.TuningSpec{
		Name:        CinderBackupAccount,
		Description: "Set cinder backup storage account.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllGeneralRoles,
	}
	CinderBackupEndpointSpec = &definition.TuningSpec{
		Name:        CinderBackupEndpoint,
		Description: "Set cinder backup storage endpoint.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CinderBackupOverrideSpec = &definition.TuningSpec{
		Name:        CinderBackupOverride,
		Description: "Enable override cinder backup configurations.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	CinderBackupPoolSpec = &definition.TuningSpec{
		Name:        CinderBackupPool,
		Description: "Set cinder backup storage pool.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CinderBackupSecretSpec = &definition.TuningSpec{
		Name:        CinderBackupSecret,
		Description: "Set cinder backup storage account secret.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CinderBackupTypeSpec = &definition.TuningSpec{
		Name:        CinderBackupType,
		Description: "Set cinder backup storage type <cube-storage|cube-swift>.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CinderDebugEnabledSpec = &definition.TuningSpec{
		Name:        CinderDebugEnabled,
		Description: "Set to true to enable cinder verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	CinderExternalAccountSpec = &definition.TuningSpec{
		Name:        CinderExternalAccount,
		Description: "Set cinder external storage account.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CinderExternalDriverSpec = &definition.TuningSpec{
		Name:        CinderExternalDriver,
		Description: "Set cinder external storage type name <cube|purestorage>.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CinderExternalEndpointSpec = &definition.TuningSpec{
		Name:        CinderExternalEndpoint,
		Description: "Set cinder external storage endpoint.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CinderExternalNameSpec = &definition.TuningSpec{
		Name:        CinderExternalName,
		Description: "Set cinder external storage rule name.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CinderExternalPoolSpec = &definition.TuningSpec{
		Name:        CinderExternalPool,
		Description: "Set cinder external storage pool.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CinderExternalSecretSpec = &definition.TuningSpec{
		Name:        CinderExternalSecret,
		Description: "Set cinder external storage account secret.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CubesysAlertLevelSpec = &definition.TuningSpec{
		Name:        CubesysAlertLevel,
		Description: "Set health alert sensible level. (0: default, 1: highly sensitive)",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 0,
			Min:     0,
			Max:     2147483647,
		},
		Roles: definition.AllRoles,
	}
	CubesysAlertLevelSSpec = &definition.TuningSpec{
		Name:        CubesysAlertLevelS,
		Description: "Set health alert sensible level for service %s. (0: default, 1: highly sensitive)",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 0,
			Min:     0,
			Max:     2147483647,
		},
		Roles: definition.AllRoles,
	}
	CubesysConntableMaxSpec = &definition.TuningSpec{
		Name:        CubesysConntableMax,
		Description: "Set max connection table size.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 262144,
			Min:     0,
			Max:     2147483647,
		},
		Roles: definition.AllRoles,
	}
	CubesysLogDefaultRetentionSpec = &definition.TuningSpec{
		Name:        CubesysLogDefaultRetention,
		Description: "Set log file retention policy in days.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 14,
			Min:     0,
			Max:     365,
		},
		Roles: definition.AllRoles,
	}
	CubesysProviderExtraSpec = &definition.TuningSpec{
		Name:        CubesysProviderExtra,
		Description: "Set extra provider interfaces ('pvd-' prefix and <= 15 chars) [IF.2:pvd-xxx,eth2:pvd-yyy,...].",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.AllRoles,
	}
	CyborgDebugEnabledSpec = &definition.TuningSpec{
		Name:        CyborgDebugEnabled,
		Description: "Set to true to enable cyborg verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	DebugEnableCoreDumpSSpec = &definition.TuningSpec{
		Name:        DebugEnableCoreDumpS,
		Description: "Enable core dump for process %s",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	DebugEnableKdumpSpec = &definition.TuningSpec{
		Name:        DebugEnableKdump,
		Description: "Enable kdump to collect dump from kernel panic",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	DebugLevelSSpec = &definition.TuningSpec{
		Name:        DebugLevelS,
		Description: "Set debug level for process %s",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 0,
			Min:     0,
			Max:     9,
		},
		Roles: definition.AllRoles,
	}
	DebugMaxCoreDumpSpec = &definition.TuningSpec{
		Name:        DebugMaxCoreDump,
		Description: "Set the total number of core files before oldest are removed",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 0,
			Min:     0,
			Max:     999,
		},
		Roles: definition.AllRoles,
	}
	DesignateDebugEnabledSpec = &definition.TuningSpec{
		Name:        DesignateDebugEnabled,
		Description: "Set to true to enable designate verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.ControlRoles,
	}
	GlanceDebugEnabledSpec = &definition.TuningSpec{
		Name:        GlanceDebugEnabled,
		Description: "Set to true to enable glance verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	GlanceExportRpSpec = &definition.TuningSpec{
		Name:        GlanceExportRp,
		Description: "glance export retention policy in copies.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 3,
			Min:     0,
			Max:     255,
		},
		Roles: definition.AllRoles,
	}
	HeatDebugEnabledSpec = &definition.TuningSpec{
		Name:        HeatDebugEnabled,
		Description: "Set to true to enable heat verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	InfluxdbCuratorRpSpec = &definition.TuningSpec{
		Name:        InfluxdbCuratorRp,
		Description: "influxdb curator retention policy in days.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 7,
			Min:     0,
			Max:     365,
		},
		Roles: definition.AllRoles,
	}
	IronicDebugEnabledSpec = &definition.TuningSpec{
		Name:        IronicDebugEnabled,
		Description: "Set to true to enable ironic verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllGeneralRoles,
	}
	IronicDeployServerSpec = &definition.TuningSpec{
		Name:        IronicDeployServer,
		Description: "Set to true to enable ironic deploy server (dhcp/tftp/pxe/http).",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllGeneralRoles,
	}
	KapacitorAlertCheckEnabledSpec = &definition.TuningSpec{
		Name:        KapacitorAlertCheckEnabled,
		Description: "Set true to enable kapacitor alert check.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.ControlRoles,
	}
	KapacitorAlertCheckEventIdSpec = &definition.TuningSpec{
		Name:        KapacitorAlertCheckEventId,
		Description: "Set kapacitor alert check eventid.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "SYS00002W",
		},
		Roles: definition.ControlRoles,
	}
	KapacitorAlertCheckIntervalSpec = &definition.TuningSpec{
		Name:        KapacitorAlertCheckInterval,
		Description: "Set kapacitor alert check interval (default to 60m).",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "60m",
		},
		Roles: definition.ControlRoles,
	}
	KapacitorAlertExtraPrefixSpec = &definition.TuningSpec{
		Name:        KapacitorAlertExtraPrefix,
		Description: "Set kapacitor alert message prefix.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "Cube",
		},
		Roles: definition.ControlRoles,
	}
	KapacitorAlertFlowBaseSpec = &definition.TuningSpec{
		Name:        KapacitorAlertFlowBase,
		Description: "Set kapacitor alert base for abnormal flow.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "7d",
		},
		Roles: definition.ControlRoles,
	}
	KapacitorAlertFlowThresholdSpec = &definition.TuningSpec{
		Name:        KapacitorAlertFlowThreshold,
		Description: "Set kapacitor alert threshold for abnormal flow.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 30,
			Min:     0,
			Max:     65535,
		},
		Roles: definition.ControlRoles,
	}
	KapacitorAlertFlowUnitSpec = &definition.TuningSpec{
		Name:        KapacitorAlertFlowUnit,
		Description: "Set kapacitor alert unit for abnormal flow.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "5m",
		},
		Roles: definition.ControlRoles,
	}
	KeystoneDebugEnabledSpec = &definition.TuningSpec{
		Name:        KeystoneDebugEnabled,
		Description: "Set to true to enable keystone verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	ManilaDebugEnabledSpec = &definition.TuningSpec{
		Name:        ManilaDebugEnabled,
		Description: "Set to true to enable manila verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	ManilaVolumeTypeSpec = &definition.TuningSpec{
		Name:        ManilaVolumeType,
		Description: "Set manila backend volume type.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "CubeStorage",
		},
		Roles: definition.AllRoles,
	}
	MasakariHostEvacuateAllSpec = &definition.TuningSpec{
		Name:        MasakariHostEvacuateAll,
		Description: "Set to true to enable evacuate all instances when host goes down.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: true,
		},
		Roles: definition.AllRoles,
	}
	MasakariWaitPeriodSpec = &definition.TuningSpec{
		Name:        MasakariWaitPeriod,
		Description: "Set wait period after service update",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 0,
			Min:     0,
			Max:     99999,
		},
		Roles: definition.ControlRoles,
	}
	MonascaDebugEnabledSpec = &definition.TuningSpec{
		Name:        MonascaDebugEnabled,
		Description: "Set to true to enable monasca verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	MysqlBackupCuratorRpSpec = &definition.TuningSpec{
		Name:        MysqlBackupCuratorRp,
		Description: "mysql backup retention policy in weeks.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 14,
			Min:     0,
			Max:     52,
		},
		Roles: definition.AllRoles,
	}
	NetIfMtuNameSpec = &definition.TuningSpec{
		Name:        NetIfMtuName,
		Description: "Set interface MTU (MTU of parent interface must be greater than its VLAN interface).",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 1500,
			Min:     68,
			Max:     65536,
		},
		Roles: definition.AllRoles,
	}
	NetIpv4TcpSyncookiesSpec = &definition.TuningSpec{
		Name:        NetIpv4TcpSyncookies,
		Description: "Turn on the Linux SYN cookies implementation.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: true,
		},
		Roles: definition.AllRoles,
	}
	NetLacpDefaultRateSpec = &definition.TuningSpec{
		Name:        NetLacpDefaultRate,
		Description: "Set default LACP rate (fast/slow).",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "fast",
		},
		Roles: definition.AllRoles,
	}
	NetLacpDefaultXmitSpec = &definition.TuningSpec{
		Name:        NetLacpDefaultXmit,
		Description: "Set default LACP transmit hash policy (layer2/layer2+3/layer3+4).",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "layer3+4",
		},
		Roles: definition.AllRoles,
	}
	NeutronDebugEnabledSpec = &definition.TuningSpec{
		Name:        NeutronDebugEnabled,
		Description: "Set to true to enable neutron verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	NovaControlHostMemorySpec = &definition.TuningSpec{
		Name:        NovaControlHostMemory,
		Description: "Amount of memory in MB to reserve for the control host.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 0,
			Min:     0,
			Max:     524288,
		},
		Roles: definition.ComputeRoles,
	}
	NovaControlHostVcpuSpec = &definition.TuningSpec{
		Name:        NovaControlHostVcpu,
		Description: "Amount of vcpu to reserve for the control host.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 0,
			Min:     0,
			Max:     128,
		},
		Roles: []*definition.Role{definition.GetControlConvergeRole(), definition.GetEdgeCoreRole()},
	}
	NovaDebugEnabledSpec = &definition.TuningSpec{
		Name:        NovaDebugEnabled,
		Description: "Set to true to enable nova verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	NovaGpuTypeSpec = &definition.TuningSpec{
		Name:        NovaGpuType,
		Description: "Specify a supported gpu type instances would get.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "",
		},
		Roles: definition.ComputeRoles,
		Selector: definition.Selector{
			Enabled: true,
			Labels:  map[string]string{"isGpuEnabled": "true"},
		},
	}
	NovaOvercommitCpuRatioSpec = &definition.TuningSpec{
		Name:        NovaOvercommitCpuRatio,
		Description: "Specify an allowed CPU overcommitted ratio.",
		ExampleValue: definition.ExampleValue{
			Type:    "float",
			Default: 16.0,
		},
		Roles: definition.AllRoles,
	}
	NovaOvercommitDiskRatioSpec = &definition.TuningSpec{
		Name:        NovaOvercommitDiskRatio,
		Description: "Specify an allowed disk overcommitted ratio.",
		ExampleValue: definition.ExampleValue{
			Type:    "float",
			Default: 1.0,
		},
		Roles: definition.AllRoles,
	}
	NovaOvercommitRamRatioSpec = &definition.TuningSpec{
		Name:        NovaOvercommitRamRatio,
		Description: "Specify an allowed RAM overcommitted ratio.",
		ExampleValue: definition.ExampleValue{
			Type:    "float",
			Default: 1.5,
		},
		Roles: definition.AllRoles,
	}
	NtpDebugEnabledSpec = &definition.TuningSpec{
		Name:        NtpDebugEnabled,
		Description: "Set to true to enable ntp verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	OctaviaDebugEnabledSpec = &definition.TuningSpec{
		Name:        OctaviaDebugEnabled,
		Description: "Set to true to enable octavia verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	OctaviaHaSpec = &definition.TuningSpec{
		Name:        OctaviaHa,
		Description: "Set to true to enable octavia HA mode.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	OpensearchCuratorRpSpec = &definition.TuningSpec{
		Name:        OpensearchCuratorRp,
		Description: "opensearch curator retention policy in days.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 7,
			Min:     0,
			Max:     365,
		},
		Roles: definition.AllRoles,
	}
	OpensearchHeapSizeSpec = &definition.TuningSpec{
		Name:        OpensearchHeapSize,
		Description: "Set opensearch heap size in MB.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 1024,
			Min:     256,
			Max:     65536,
		},
		Roles: definition.AllRoles,
	}
	SenlinDebugEnabledSpec = &definition.TuningSpec{
		Name:        SenlinDebugEnabled,
		Description: "Set to true to enable senlin verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	SkylineDebugEnabledSpec = &definition.TuningSpec{
		Name:        SkylineDebugEnabled,
		Description: "Set to true to enable skyline verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	SnapshotApplyActionSpec = &definition.TuningSpec{
		Name:        SnapshotApplyAction,
		Description: "Set snapshot apply action <apply|revert>.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "apply",
		},
		Roles: definition.AllRoles,
	}
	SnapshotApplyPolicyIgnoreSpec = &definition.TuningSpec{
		Name:        SnapshotApplyPolicyIgnore,
		Description: "Set snapshot apply policy ignore <true|false>.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	SshdBindToAllInterfacesSpec = &definition.TuningSpec{
		Name:        SshdBindToAllInterfaces,
		Description: "Set to true to bind sshd to all interfaces.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	SshdSessionInactivitySpec = &definition.TuningSpec{
		Name:        SshdSessionInactivity,
		Description: "Set sshd session inactivity timeout in seconds.",
		ExampleValue: definition.ExampleValue{
			Type:    "int",
			Default: 0,
			Min:     0,
			Max:     86400,
		},
		Roles: definition.AllRoles,
	}
	TimeTimezoneSpec = &definition.TuningSpec{
		Name:        TimeTimezone,
		Description: "Set system timezone.",
		ExampleValue: definition.ExampleValue{
			Type:    "string",
			Default: "UTC",
		},
		Roles: definition.AllRoles,
	}
	UpdateSecurityAutoUpdateSpec = &definition.TuningSpec{
		Name:        UpdateSecurityAutoUpdate,
		Description: "Set to true to enable security autoupdate.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
	WatcherDebugEnabledSpec = &definition.TuningSpec{
		Name:        WatcherDebugEnabled,
		Description: "Set to true to enable watcher verbose log.",
		ExampleValue: definition.ExampleValue{
			Type:    "bool",
			Default: false,
		},
		Roles: definition.AllRoles,
	}
)
View Source
var (
	OrderSensitiveServices = []definition.Service{
		{
			Name: "clusterLink",
			Modules: []definition.Module{
				{Name: "link", IsAutoRepairable: false},
				{Name: "clock", IsAutoRepairable: true},
				{Name: "dns", IsAutoRepairable: false},
			},
		},
		{
			Name: "clusterSys",
			Modules: []definition.Module{
				{Name: "bootstrap", IsAutoRepairable: false},
				{Name: "license", IsAutoRepairable: false},
			},
		},
		{
			Name: "clusterSettings",
			Modules: []definition.Module{
				{Name: "etcd", IsAutoRepairable: true},
				{Name: "nodelist", IsAutoRepairable: false},
			},
		},
		{
			Name: "haCluster",
			Modules: []definition.Module{
				{Name: "hacluster", IsAutoRepairable: true},
			},
		},
		{
			Name: "msgQueue",
			Modules: []definition.Module{
				{Name: "rabbitmq", IsAutoRepairable: true},
			},
		},
		{
			Name: "iaasDb",
			Modules: []definition.Module{
				{Name: "mysql", IsAutoRepairable: true},
			},
		},
		{
			Name: "virtualIp",
			Modules: []definition.Module{
				{Name: "vip", IsAutoRepairable: true},
				{Name: "haproxy_ha", IsAutoRepairable: true},
			},
		},
		{
			Name: "storage",
			Modules: []definition.Module{
				{Name: "ceph", IsAutoRepairable: false},
				{Name: "ceph_mon", IsAutoRepairable: true},
				{Name: "ceph_mgr", IsAutoRepairable: true},
				{Name: "ceph_mds", IsAutoRepairable: true},
				{Name: "ceph_osd", IsAutoRepairable: true},
				{Name: "ceph_rgw", IsAutoRepairable: true},
				{Name: "rbd_target", IsAutoRepairable: false},
			},
		},
		{
			Name: "apiService",
			Modules: []definition.Module{
				{Name: "haproxy", IsAutoRepairable: true},
				{Name: "httpd", IsAutoRepairable: true},
				{Name: "skyline", IsAutoRepairable: true},
				{Name: "lmi", IsAutoRepairable: true},
				{Name: "memcache", IsAutoRepairable: true},
			},
		},
		{
			Name: "singleSignOn",
			Modules: []definition.Module{
				{Name: "k3s", IsAutoRepairable: true},
				{Name: "keycloak", IsAutoRepairable: true},
			},
		},
		{
			Name: "network",
			Modules: []definition.Module{
				{Name: "neutron", IsAutoRepairable: true},
			},
		},
		{
			Name: "compute",
			Modules: []definition.Module{
				{Name: "nova", IsAutoRepairable: true},
				{Name: "cyborg", IsAutoRepairable: true},
			},
		},
		{
			Name: "bareMetal",
			Modules: []definition.Module{
				{Name: "ironic", IsAutoRepairable: true},
			},
		},
		{
			Name: "image",
			Modules: []definition.Module{
				{Name: "glance", IsAutoRepairable: true},
			},
		},
		{
			Name: "blockStor",
			Modules: []definition.Module{
				{Name: "cinder", IsAutoRepairable: true},
			},
		},
		{
			Name: "fileStor",
			Modules: []definition.Module{
				{Name: "manila", IsAutoRepairable: true},
			},
		},
		{
			Name: "objectStor",
			Modules: []definition.Module{
				{Name: "swift", IsAutoRepairable: false},
			},
		},
		{
			Name: "orchestration",
			Modules: []definition.Module{
				{Name: "heat", IsAutoRepairable: true},
			},
		},
		{
			Name: "lbaas",
			Modules: []definition.Module{
				{Name: "octavia", IsAutoRepairable: true},
			},
		},
		{
			Name: "dnsaas",
			Modules: []definition.Module{
				{Name: "designate", IsAutoRepairable: true},
			},
		},
		{
			Name: "k8saas",
			Modules: []definition.Module{
				{Name: "rancher", IsAutoRepairable: false},
			},
		},
		{
			Name: "instanceHa",
			Modules: []definition.Module{
				{Name: "masakari", IsAutoRepairable: true},
			},
		},
		{
			Name: "businessLogic",
			Modules: []definition.Module{
				{Name: "senlin", IsAutoRepairable: true},
				{Name: "watcher", IsAutoRepairable: true},
			},
		},
		{
			Name: "dataPipe",
			Modules: []definition.Module{
				{Name: "zookeeper", IsAutoRepairable: true},
				{Name: "kafka", IsAutoRepairable: true},
			},
		},
		{
			Name: "metrics",
			Modules: []definition.Module{
				{Name: "monasca", IsAutoRepairable: true},
				{Name: "telegraf", IsAutoRepairable: true},
				{Name: "grafana", IsAutoRepairable: true},
			},
		},
		{
			Name: "logAnalytics",
			Modules: []definition.Module{
				{Name: "filebeat", IsAutoRepairable: true},
				{Name: "auditbeat", IsAutoRepairable: true},
				{Name: "logstash", IsAutoRepairable: true},
				{Name: "opensearch", IsAutoRepairable: true},
				{Name: "opensearch-dashboards", IsAutoRepairable: true},
			},
		},
		{
			Name: "notifications",
			Modules: []definition.Module{
				{Name: "influxdb", IsAutoRepairable: true},
				{Name: "kapacitor", IsAutoRepairable: true},
			},
		},
		{
			Name: "node",
			Modules: []definition.Module{
				{Name: "node", IsAutoRepairable: false},
			},
		},
	}
)

Functions

func AcquireTuningLock

func AcquireTuningLock() error

func ApplyHexTuning

func ApplyHexTuning(isolatedDir string) error

func ApplyHexTunings

func ApplyHexTunings(tunings []definition.Tuning) error

func CheckServiceHealth

func CheckServiceHealth(service definition.Service) error

func CountEvents

func CountEvents(stmt string) (int64, error)

func CreateToken

func CreateToken(user *definition.User) (*gocloak.JWT, error)

func GetControllerVirtualIp

func GetControllerVirtualIp(mgmtNet string) (string, error)

func GetDataCenterName

func GetDataCenterName() (string, error)

func GetEvents

func GetEvents(stmt string) ([]definition.Event, error)

func GetHostCpuRank

func GetHostCpuRank(top int) ([]definition.HostPercentageUsage, error)

func GetHostCpuSummary

func GetHostCpuSummary() (*definition.ComputeStatistic, error)

func GetHostMemoryRank

func GetHostMemoryRank() ([]definition.HostPercentageUsage, error)

func GetHostMemorySummary

func GetHostMemorySummary() (*definition.SpaceStatistic, error)

func GetHostNetworkEgressRank

func GetHostNetworkEgressRank() ([]definition.HostNetworkPacket, error)

func GetHostNetworkIngressRank

func GetHostNetworkIngressRank() ([]definition.HostNetworkPacket, error)

func GetHostStorageBandwidthSeries

func GetHostStorageBandwidthSeries(period definition.Period) (*definition.StorageBandwidthSeries, error)

func GetHostStorageIopsSeries

func GetHostStorageIopsSeries(period definition.Period) (*definition.StorageIopsSeries, error)

func GetHostStorageLatencySeries

func GetHostStorageLatencySeries(period definition.Period) (*definition.StorageLatencySeries, error)

func GetHostStorageUsageRank

func GetHostStorageUsageRank(top int) ([]definition.HostPercentageUsage, error)

func GetManagementIp

func GetManagementIp(mgmtNet string) (string, error)

func GetMgmtNet

func GetMgmtNet() (string, error)

func GetNodeRole

func GetNodeRole() (string, error)

func GetPolicy

func GetPolicy() (*definition.Policy, error)

func GetUnhealthyServices

func GetUnhealthyServices() ([]definition.Service, error)

func GetVmCpuRank

func GetVmCpuRank(top int) ([]definition.VmPercentageUsage, error)

func GetVmMemoryRank

func GetVmMemoryRank(top int) ([]definition.VmMetricsUsage, error)

func GetVmUsage

func GetVmUsage() (*definition.Usage, error)

func GetVmsNetworkEgressRank

func GetVmsNetworkEgressRank(top int) ([]definition.VmMetricsUsage, error)

func GetVmsNetworkIngressRank

func GetVmsNetworkIngressRank(top int) ([]definition.VmMetricsUsage, error)

func GetVmsStorageIopsReadRank

func GetVmsStorageIopsReadRank(top int) ([]definition.VmMetricsUsage, error)

func GetVmsStorageIopsWriteRank

func GetVmsStorageIopsWriteRank(top int) ([]definition.VmMetricsUsage, error)

func IsClusterSetReady

func IsClusterSetReady() bool

func IsEventTypeValid

func IsEventTypeValid(t string) bool

func IsExpectedEmptyStdOut

func IsExpectedEmptyStdOut(err error) bool

func IsGpuEnabled

func IsGpuEnabled() bool

func IsHaEnabled

func IsHaEnabled() (bool, error)

func IsHexTuningApplied

func IsHexTuningApplied(tuning definition.Tuning) error

func IsHexTuningDeleted

func IsHexTuningDeleted(tuning definition.Tuning) error

func IsLocalDataCenter

func IsLocalDataCenter(dataCenter string) bool

M2 TODO: Check if the data center is local

func IsMetricGroupValid

func IsMetricGroupValid(t string) bool

func IsMetricReportTypeValid

func IsMetricReportTypeValid(t string) bool

func IsMetricTypeValid

func IsMetricTypeValid(t string) bool

func IsModuleHealthy

func IsModuleHealthy(moduleName string) bool

func IsRepairable

func IsRepairable() bool

func IsRepairing

func IsRepairing() bool

func IsResourceTypeValid

func IsResourceTypeValid(t string) bool

func ListBuiltInIntegrations

func ListBuiltInIntegrations() []definition.Integration

func ListHypervisors

func ListHypervisors() ([]hypervisors.Hypervisor, error)

func ListLicenses

func ListLicenses() ([]definition.License, error)

func ListNodes

func ListNodes() ([]*definition.Node, error)

func ReadHexTuning

func ReadHexTuning(parameterName string) (string, error)

func ReleaseTuningLock

func ReleaseTuningLock() error

func RepairModule

func RepairModule(moduleName string) error

func RepairServiceHealth

func RepairServiceHealth(service definition.Service) error

Types

type Health

type Health struct {
	*definition.DataCenter `json:"dataCenter,omitempty" bson:"dataCenter,omitempty"`
	*Overall               `json:"overall,omitempty" bson:"overall"`
	InUse                  []definition.Service `json:"inUse" bson:"inUse"`
	Error                  []definition.Service `json:"error" bson:"error"`
	Fixing                 []definition.Service `json:"fixing" bson:"fixing"`
}

func (*Health) AddError

func (h *Health) AddError(svc definition.Service, err error)

func (*Health) AddOk

func (h *Health) AddOk(svc definition.Service)

func (*Health) CopyEmptyServiceStruct

func (h *Health) CopyEmptyServiceStruct() Health

func (*Health) HasUnhealthyService

func (h *Health) HasUnhealthyService() bool

type HostSummary

type HostSummary struct {
	Role             `json:"role"`
	definition.Usage `json:"usage"`
}

func GetHostSummary

func GetHostSummary() (*HostSummary, error)

type Overall

type Overall struct {
	Status status.Details `json:"status,omitempty" bson:"status"`
}

type Role

type Role struct {
	ControlConverged int `json:"controlConverged"`
	Control          int `json:"control"`
	Compute          int `json:"compute"`
	Storage          int `json:"storage"`
	Others           int `json:"others"`
}

func GetRoleStatus

func GetRoleStatus() (*Role, error)

type Summary

type Summary struct {
	Host HostSummary `json:"host"`
	Vm   VmSummary   `json:"vm"`
}

func GetDataCenterSummary

func GetDataCenterSummary() (*Summary, error)

func (*Summary) Bytes

func (s *Summary) Bytes() []byte

type VmStatus

type VmStatus struct {
	Total   int `json:"total"`
	Running int `json:"running"`
	Stopped int `json:"stopped"`
	Suspend int `json:"suspend"`
	Paused  int `json:"paused"`
	Error   int `json:"error"`
	Unknown int `json:"unknown"`
}

func GetVmStatus

func GetVmStatus() (*VmStatus, error)

type VmSummary

type VmSummary struct {
	Status           VmStatus `json:"status"`
	definition.Usage `json:"usage"`
}

func GetVmSummary

func GetVmSummary() (*VmSummary, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL