Documentation ¶
Index ¶
- Constants
- func IsRootPartition(path string) bool
- func StartDetachStorages(hs []jsonutils.JSONObject)
- func Stop()
- type OvnHelper
- type QemuCaps
- type SCPUInfo
- type SHostInfo
- func (h *SHostInfo) AppendError(content, errType, id, name string)
- func (h *SHostInfo) AppendHostError(content string)
- func (h *SHostInfo) CpuCmtBound() int
- func (h *SHostInfo) DisableHugepages()
- func (h *SHostInfo) DisableKsm()
- func (h *SHostInfo) EnableKsm(sleepSec int)
- func (h *SHostInfo) EnableNativeHugepages()
- func (h *SHostInfo) EnableTransparentHugepages()
- func (h *SHostInfo) GetBridgeDev(bridge string) hostbridge.IBridgeDriver
- func (h *SHostInfo) GetCRI() pod.CRI
- func (h *SHostInfo) GetContainerCPUMap() *pod.HostContainerCPUMap
- func (h *SHostInfo) GetContainerDeviceConfigurationFilePath() string
- func (h *SHostInfo) GetContainerRuntimeEndpoint() string
- func (h *SHostInfo) GetContainerStatsProvider() stats.ContainerStatsProvider
- func (h *SHostInfo) GetCpuArchitecture() string
- func (h *SHostInfo) GetHostId() string
- func (h *SHostInfo) GetHostTopology() *hostapi.HostTopology
- func (h *SHostInfo) GetId() string
- func (h *SHostInfo) GetIsolatedDeviceManager() isolated_device.IsolatedDeviceManager
- func (h *SHostInfo) GetKVMMaxCpus() uint
- func (h *SHostInfo) GetKernelVersion() string
- func (h *SHostInfo) GetKubeletConfig() kubelet.KubeletConfig
- func (h *SHostInfo) GetMasterIp() string
- func (h *SHostInfo) GetMasterMac() string
- func (h *SHostInfo) GetMasterNicIpAndMask() (string, int)
- func (h *SHostInfo) GetMemory() int
- func (h *SHostInfo) GetMemoryTotal() int
- func (h *SHostInfo) GetName() string
- func (h *SHostInfo) GetNodeHugepages() error
- func (h *SHostInfo) GetQemuMachineInfoList() []monitor.MachineInfo
- func (h *SHostInfo) GetReservedCpusInfo() *cpuset.CPUSet
- func (h *SHostInfo) GetSession() *mcclient.ClientSession
- func (h *SHostInfo) GetZoneId() string
- func (h *SHostInfo) HugepageSizeKb() int
- func (h *SHostInfo) Init(ctx context.Context) error
- func (h *SHostInfo) IsAarch64() bool
- func (h *SHostInfo) IsContainerHost() bool
- func (h *SHostInfo) IsContainerdRuning() bool
- func (h *SHostInfo) IsHugepagesEnabled() bool
- func (h *SHostInfo) IsKvmSupport() bool
- func (h *SHostInfo) IsNestedVirtualization() bool
- func (h *SHostInfo) IsNumaAllocateEnabled() bool
- func (h *SHostInfo) IsX8664() bool
- func (h *SHostInfo) Keyword() string
- func (h *SHostInfo) OnCatalogChanged(catalog mcclient.KeystoneServiceCatalogV3)
- func (h *SHostInfo) PreventArpFlux()
- func (h *SHostInfo) ProbeSyncIsolatedDevices(hostId string, body jsonutils.JSONObject) (interface{}, error)
- func (h *SHostInfo) PutHostOnline() error
- func (h *SHostInfo) RemoveErrorType(errType string)
- func (h *SHostInfo) SetOnHostDown(action string) error
- func (h *SHostInfo) StartDHCPServer()
- func (h *SHostInfo) StartRegister(delay int)
- func (h *SHostInfo) UpdateSyncInfo(hostId string, body jsonutils.JSONObject) (interface{}, error)
- type SMemory
- type SNIC
- type SSysInfo
Constants ¶
View Source
const ( KVM_GET_API_VERSION = uintptr(44544) KVM_CREATE_VM = uintptr(44545) KVM_CHECK_EXTENSION = uintptr(44547) KVM_CAP_NR_VCPUS = 9 KVM_CAP_MAX_VCPUS = 66 )
View Source
const ( ErrOvnService = errors.Error("ovn controller") ErrOvnConfig = errors.Error("ovn controller configuration") )
Variables ¶
This section is empty.
Functions ¶
func IsRootPartition ¶
func StartDetachStorages ¶
func StartDetachStorages(hs []jsonutils.JSONObject)
Types ¶
type OvnHelper ¶
type OvnHelper struct {
// contains filtered or unexported fields
}
func NewOvnHelper ¶
type QemuCaps ¶
type QemuCaps struct { QemuVersion string MachineInfoList []monitor.MachineInfo }
type SCPUInfo ¶
type SCPUInfo struct { CpuCount int CpuArchitecture string // contains filtered or unexported fields }
func DetectCpuInfo ¶
type SHostInfo ¶
type SHostInfo struct { Cpu *SCPUInfo Mem *SMemory IsolatedDeviceMan isolated_device.IsolatedDeviceManager MasterNic *netutils2.SNetInterface Nics []*SNIC HostId string Zone string ZoneId string Cloudregion string CloudregionId string ZoneManagerUri string Project_domain string Domain_id string FullName string SysError map[string][]api.HostError IoScheduler string // contains filtered or unexported fields }
func NewHostInfo ¶
func (*SHostInfo) AppendError ¶
func (*SHostInfo) AppendHostError ¶
func (*SHostInfo) CpuCmtBound ¶
func (*SHostInfo) DisableHugepages ¶
func (h *SHostInfo) DisableHugepages()
func (*SHostInfo) DisableKsm ¶
func (h *SHostInfo) DisableKsm()
func (*SHostInfo) EnableNativeHugepages ¶
func (h *SHostInfo) EnableNativeHugepages()
func (*SHostInfo) EnableTransparentHugepages ¶
func (h *SHostInfo) EnableTransparentHugepages()
func (*SHostInfo) GetBridgeDev ¶
func (h *SHostInfo) GetBridgeDev(bridge string) hostbridge.IBridgeDriver
func (*SHostInfo) GetContainerCPUMap ¶
func (h *SHostInfo) GetContainerCPUMap() *pod.HostContainerCPUMap
func (*SHostInfo) GetContainerDeviceConfigurationFilePath ¶
func (*SHostInfo) GetContainerRuntimeEndpoint ¶
func (*SHostInfo) GetContainerStatsProvider ¶
func (h *SHostInfo) GetContainerStatsProvider() stats.ContainerStatsProvider
func (*SHostInfo) GetCpuArchitecture ¶
func (*SHostInfo) GetHostTopology ¶
func (h *SHostInfo) GetHostTopology() *hostapi.HostTopology
func (*SHostInfo) GetIsolatedDeviceManager ¶
func (h *SHostInfo) GetIsolatedDeviceManager() isolated_device.IsolatedDeviceManager
func (*SHostInfo) GetKVMMaxCpus ¶
func (*SHostInfo) GetKernelVersion ¶
func (*SHostInfo) GetKubeletConfig ¶
func (h *SHostInfo) GetKubeletConfig() kubelet.KubeletConfig
func (*SHostInfo) GetMasterIp ¶
func (*SHostInfo) GetMasterMac ¶
func (*SHostInfo) GetMasterNicIpAndMask ¶
func (*SHostInfo) GetMemoryTotal ¶
func (*SHostInfo) GetNodeHugepages ¶
func (*SHostInfo) GetQemuMachineInfoList ¶
func (h *SHostInfo) GetQemuMachineInfoList() []monitor.MachineInfo
func (*SHostInfo) GetReservedCpusInfo ¶
func (*SHostInfo) GetSession ¶
func (h *SHostInfo) GetSession() *mcclient.ClientSession
func (*SHostInfo) HugepageSizeKb ¶
func (*SHostInfo) Init ¶
In this order init host service: * 1. prepare env, fix environment variable path * 2. detect hostinfo, fill host capability and custom host field * 3. prepare hostbridge, start openvswitch service * 4. parse host config, config ip address * 5. check is ovn support, setup ovn chassis
func (*SHostInfo) IsContainerHost ¶
func (*SHostInfo) IsContainerdRuning ¶
func (*SHostInfo) IsHugepagesEnabled ¶
func (*SHostInfo) IsKvmSupport ¶
func (*SHostInfo) IsNestedVirtualization ¶
func (*SHostInfo) IsNumaAllocateEnabled ¶
func (*SHostInfo) OnCatalogChanged ¶
func (h *SHostInfo) OnCatalogChanged(catalog mcclient.KeystoneServiceCatalogV3)
func (*SHostInfo) PreventArpFlux ¶
func (h *SHostInfo) PreventArpFlux()
func (*SHostInfo) ProbeSyncIsolatedDevices ¶
func (h *SHostInfo) ProbeSyncIsolatedDevices(hostId string, body jsonutils.JSONObject) (interface{}, error)
func (*SHostInfo) PutHostOnline ¶
func (*SHostInfo) RemoveErrorType ¶
func (*SHostInfo) SetOnHostDown ¶
func (*SHostInfo) StartDHCPServer ¶
func (h *SHostInfo) StartDHCPServer()
func (*SHostInfo) StartRegister ¶
func (*SHostInfo) UpdateSyncInfo ¶
func (h *SHostInfo) UpdateSyncInfo(hostId string, body jsonutils.JSONObject) (interface{}, error)
type SMemory ¶
type SMemory struct { Total int Free int Used int MemInfo *types.SDMIMemInfo }
func DetectMemoryInfo ¶
func (*SMemory) GetHugepages ¶
func (m *SMemory) GetHugepages() (sysutils.THugepages, error)
type SNIC ¶
type SNIC struct { Inter string Bridge string Ip string Wire string WireId string Mask int Bandwidth int BridgeDev hostbridge.IBridgeDriver // contains filtered or unexported fields }
func (*SNIC) EnableDHCPRelay ¶
func (*SNIC) ExitCleanup ¶
func (n *SNIC) ExitCleanup()
func (*SNIC) SetupDhcpRelay ¶
type SSysInfo ¶
type SSysInfo struct { *types.SSystemInfo Nest string `json:"nest,omitempty"` OsDistribution string `json:"os_distribution"` OsVersion string `json:"os_version"` KernelVersion string `json:"kernel_version"` QemuVersion string `json:"qemu_version"` OvsVersion string `json:"ovs_version"` KvmModule string `json:"kvm_module"` CpuModelName string `json:"cpu_model_name"` CpuMicrocode string `json:"cpu_microcode"` StorageType string `json:"storage_type"` HugepagesOption string `json:"hugepages_option"` HugepageSizeKb int `json:"hugepage_size_kb"` HugepageNr *int `json:"hugepage_nr"` NodeHugepages []hostapi.HostNodeHugepageNr `json:"node_hugepages"` Topology *hostapi.HostTopology `json:"topology"` CPUInfo *hostapi.HostCPUInfo `json:"cpu_info"` MotherboardInfo *types.SSystemInfo `json:"motherboard_info"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.