Documentation ¶
Index ¶
- Constants
- func AreAllLogicalProcessorsFromSocketUnused(extCpuInfo *extendedCPUInfo, socketId int) bool
- func CalculateCPUSets(systemInfo *systemInfo, reservedCPUCount int, offlinedCPUCount int, ...) (cpuset.CPUSet, cpuset.CPUSet, cpuset.CPUSet, error)
- func EnsureNodesHaveTheSameHardware(nodeHandlers []*GHWHandler, tolerations TolerationSet) error
- func GetAdditionalKernelArgs(disableHT bool) []string
- func GetMCP(mustGatherDirPath, mcpName string) (*machineconfigv1.MachineConfigPool, error)
- func GetMCPList(mustGatherDirPath string) ([]*machineconfigv1.MachineConfigPool, error)
- func GetMCPSelector(pool *mcfgv1.MachineConfigPool, clusterPools []*mcfgv1.MachineConfigPool) (map[string]string, error)
- func GetNodeList(mustGatherDirPath string) ([]*v1.Node, error)
- func GetNodesForPool(pool *mcfgv1.MachineConfigPool, clusterPools []*mcfgv1.MachineConfigPool, ...) ([]*corev1.Node, error)
- func IsExternalControlPlaneCluster(mustGatherDirPath string) (bool, error)
- func IsLogicalProcessorUsed(extCPUInfo *extendedCPUInfo, logicalProcessor int) bool
- type GHWHandler
- func (ghwHandler GHWHandler) CPU() (*cpu.Info, error)
- func (ghwHandler GHWHandler) GatherSystemInfo() (*systemInfo, error)
- func (ghwHandler GHWHandler) IsHyperthreadingEnabled() (bool, error)
- func (ghwHandler GHWHandler) SortedCPU() (*cpu.Info, error)
- func (ghwHandler GHWHandler) SortedTopology() (*topology.Info, error)
- type TolerationSet
Constants ¶
const ( EnableHardwareTuning = "enableHardwareTuning" HardwareTuningMessage = `` /* 364-byte string literal not displayed */ DifferentCoreIDs = "differentCoreIDs" DifferentCoreIDsMessage = `` /* 660-byte string literal not displayed */ )
const ( // ClusterScopedResources defines the subpath, relative to the top-level must-gather directory. // A top-level must-gather directory is of the following format: // must-gather-dir/quay-io-openshift-kni-performance-addon-operator-must-gather-sha256-<Image SHA> // Here we find the cluster-scoped definitions saved by must-gather ClusterScopedResources = "cluster-scoped-resources" // CoreNodes defines the subpath, relative to ClusterScopedResources, on which we find node-specific data CoreNodes = "core/nodes" // MCPools defines the subpath, relative to ClusterScopedResources, on which we find the machine config pool definitions MCPools = "machineconfiguration.openshift.io/machineconfigpools" // YAMLSuffix is the extension of the yaml files saved by must-gather YAMLSuffix = ".yaml" // Nodes defines the subpath, relative to top-level must-gather directory, on which we find node-specific data Nodes = "nodes" // SysInfoFileName defines the name of the file where ghw snapshot is stored SysInfoFileName = "sysinfo.tgz" )
Variables ¶
This section is empty.
Functions ¶
func CalculateCPUSets ¶
func CalculateCPUSets(systemInfo *systemInfo, reservedCPUCount int, offlinedCPUCount int, splitReservedCPUsAcrossNUMA bool, disableHTFlag bool, highPowerConsumptionMode bool) (cpuset.CPUSet, cpuset.CPUSet, cpuset.CPUSet, error)
Calculates the resevered, isolated and offlined cpuSets.
func EnsureNodesHaveTheSameHardware ¶
func EnsureNodesHaveTheSameHardware(nodeHandlers []*GHWHandler, tolerations TolerationSet) error
EnsureNodesHaveTheSameHardware returns an error if all the input nodes do not have the same hardware configuration and updates the toleration set to consider as warnings/comments when publishing the generated profile
func GetAdditionalKernelArgs ¶
GetAdditionalKernelArgs returns a set of kernel parameters based on configuration
func GetMCP ¶
func GetMCP(mustGatherDirPath, mcpName string) (*machineconfigv1.MachineConfigPool, error)
GetMCP returns an MCP object corresponding to a specified MCP Name
func GetMCPList ¶
func GetMCPList(mustGatherDirPath string) ([]*machineconfigv1.MachineConfigPool, error)
GetMCPList returns the list of MCPs using the mcp YAMLs stored in Must Gather
func GetMCPSelector ¶
func GetMCPSelector(pool *mcfgv1.MachineConfigPool, clusterPools []*mcfgv1.MachineConfigPool) (map[string]string, error)
GetMCPSelector returns a label that is unique to the target pool, error otherwise
func GetNodeList ¶
GetNodeList returns the list of nodes using the Node YAMLs stored in Must Gather
func GetNodesForPool ¶
func GetNodesForPool(pool *mcfgv1.MachineConfigPool, clusterPools []*mcfgv1.MachineConfigPool, clusterNodes []*corev1.Node) ([]*corev1.Node, error)
GetNodesForPool returns the nodes belonging to the input mcp Adapted (including dependencies) from: https://github.com/openshift/machine-config-operator/blob/e4aa3bc5a405c67fb112b24e24b2c372457b3358/pkg/controller/node/node_controller.go#L745
func IsExternalControlPlaneCluster ¶
IsExternalControlPlaneCluster return whether the control plane is running on externally outside the cluster
func IsLogicalProcessorUsed ¶
Types ¶
type GHWHandler ¶
GHWHandler is a wrapper around ghw to get the API object
func NewGHWHandler ¶
func NewGHWHandler(mustGatherDirPath string, node *v1.Node) (*GHWHandler, error)
NewGHWHandler is a handler to use ghw options corresponding to a node
func (GHWHandler) CPU ¶
func (ghwHandler GHWHandler) CPU() (*cpu.Info, error)
CPU returns a CPUInfo struct that contains information about the CPUs on the host system
func (GHWHandler) GatherSystemInfo ¶
func (ghwHandler GHWHandler) GatherSystemInfo() (*systemInfo, error)
func (GHWHandler) IsHyperthreadingEnabled ¶
func (ghwHandler GHWHandler) IsHyperthreadingEnabled() (bool, error)
IsHyperthreadingEnabled checks if hyperthreading is enabled on the system or not
func (GHWHandler) SortedTopology ¶
func (ghwHandler GHWHandler) SortedTopology() (*topology.Info, error)
SortedTopology returns a TopologyInfo struct that contains information about the Topology sorted by numa ids and cpu ids on the host system
type TolerationSet ¶
TolerationSet records the data to be tolerated or warned about based on the tool handling