Documentation ¶
Index ¶
- Constants
- func HasOvnSupport() bool
- func IsRootPartition(path string) bool
- func MustGetOvnVersion() string
- func OvnControllerInsideContainer() bool
- func StartDetachStorages(hs []jsonutils.JSONObject)
- func Stop()
- type OvnHelper
- type SCPUInfo
- type SCatalog
- type SEndpoint
- type SHostInfo
- func (h *SHostInfo) DisableHugepages()
- func (h *SHostInfo) DisableKsm()
- func (h *SHostInfo) EnableKsm(sleepSec int)
- func (h *SHostInfo) EnableNativeHugepages(reservedMb int) error
- func (h *SHostInfo) EnableTransparentHugepages()
- func (h *SHostInfo) GetBridgeDev(bridge string) hostbridge.IBridgeDriver
- func (h *SHostInfo) GetCpuArchitecture() string
- func (h *SHostInfo) GetHostId() string
- func (h *SHostInfo) GetId() string
- func (h *SHostInfo) GetIsolatedDeviceManager() isolated_device.IsolatedDeviceManager
- 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) GetMatchNic(bridge, iface, mac string) *SNIC
- func (h *SHostInfo) GetMemory() int
- func (h *SHostInfo) GetName() string
- func (h *SHostInfo) GetSession() *mcclient.ClientSession
- func (h *SHostInfo) GetZoneId() string
- func (h *SHostInfo) HugepageSizeKb() int
- func (h *SHostInfo) Init() error
- func (h *SHostInfo) IsAarch64() bool
- func (h *SHostInfo) IsHugepagesEnabled() bool
- func (h *SHostInfo) IsKvmSupport() bool
- func (h *SHostInfo) IsNestedVirtualization() 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) StartDHCPServer()
- func (h *SHostInfo) StartPinger()
- func (h *SHostInfo) StartRegister(delay int, callback func())
- func (h *SHostInfo) UpdateSyncInfo(hostId string, body jsonutils.JSONObject) (interface{}, error)
- type SHostPingTask
- type SMemory
- type SNIC
- type SSysInfo
Constants ¶
View Source
const ( ErrOvnService = errors.Error("ovn controller") ErrOvnConfig = errors.Error("ovn controller configuration") )
Variables ¶
This section is empty.
Functions ¶
func HasOvnSupport ¶
func HasOvnSupport() bool
func IsRootPartition ¶
func MustGetOvnVersion ¶
func MustGetOvnVersion() string
func OvnControllerInsideContainer ¶
func OvnControllerInsideContainer() bool
func StartDetachStorages ¶
func StartDetachStorages(hs []jsonutils.JSONObject)
Types ¶
type OvnHelper ¶
type OvnHelper struct {
// contains filtered or unexported fields
}
func NewOvnHelper ¶
type SCPUInfo ¶
type SCPUInfo struct { CpuCount int CpuArchitecture string // contains filtered or unexported fields }
func DetectCpuInfo ¶
func (*SCPUInfo) GetJsonDesc ¶
percentInterval(ms)
type SCatalog ¶
type SCatalog struct { Id string `json:"id"` Name string `json:"name"` Type string `json:"type"` Endpoints []SEndpoint `json:"endpoint"` }
func NewCatalog ¶
func NewCatalog() *SCatalog
type SHostInfo ¶
type SHostInfo struct { IsRegistered chan 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]string SysWarning map[string]string IoScheduler string // contains filtered or unexported fields }
func NewHostInfo ¶
func (*SHostInfo) DisableHugepages ¶
func (h *SHostInfo) DisableHugepages()
func (*SHostInfo) DisableKsm ¶
func (h *SHostInfo) DisableKsm()
func (*SHostInfo) EnableNativeHugepages ¶
func (*SHostInfo) EnableTransparentHugepages ¶
func (h *SHostInfo) EnableTransparentHugepages()
func (*SHostInfo) GetBridgeDev ¶
func (h *SHostInfo) GetBridgeDev(bridge string) hostbridge.IBridgeDriver
func (*SHostInfo) GetCpuArchitecture ¶
func (*SHostInfo) GetIsolatedDeviceManager ¶
func (h *SHostInfo) GetIsolatedDeviceManager() isolated_device.IsolatedDeviceManager
func (*SHostInfo) GetKubeletConfig ¶
func (h *SHostInfo) GetKubeletConfig() kubelet.KubeletConfig
func (*SHostInfo) GetMasterIp ¶
func (*SHostInfo) GetMasterMac ¶
func (*SHostInfo) GetMasterNicIpAndMask ¶
func (*SHostInfo) GetMatchNic ¶
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) IsHugepagesEnabled ¶
func (*SHostInfo) IsKvmSupport ¶
func (*SHostInfo) IsNestedVirtualization ¶
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) StartDHCPServer ¶
func (h *SHostInfo) StartDHCPServer()
func (*SHostInfo) StartPinger ¶
func (h *SHostInfo) StartPinger()
func (*SHostInfo) StartRegister ¶
func (*SHostInfo) UpdateSyncInfo ¶
func (h *SHostInfo) UpdateSyncInfo(hostId string, body jsonutils.JSONObject) (interface{}, error)
type SHostPingTask ¶
type SHostPingTask struct {
// contains filtered or unexported fields
}
func NewHostPingTask ¶
func NewHostPingTask(interval int) *SHostPingTask
func (*SHostPingTask) Start ¶
func (p *SHostPingTask) Start()
func (*SHostPingTask) Stop ¶
func (p *SHostPingTask) Stop()
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 Network 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"` Topology *hostapi.HostTopology `json:"topology"` CPUInfo *hostapi.HostCPUInfo `json:"cpu_info"` }
Click to show internal directories.
Click to hide internal directories.