Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IncompatibleGRESConfigurationError ¶ added in v1.3.0
type IncompatibleGRESConfigurationError struct {
// contains filtered or unexported fields
}
IncompatibleGRESConfigurationError reports that an existing hybrid Slurm node cannot represent the DRA inventory discovered on its Kubernetes node. The error includes the minimum gres.conf inventory needed to fix the node.
func (*IncompatibleGRESConfigurationError) Error ¶ added in v1.3.0
func (e *IncompatibleGRESConfigurationError) Error() string
type SlurmControlInterface ¶
type SlurmControlInterface interface {
// NodeExists returns true if the Slurm node exists, false if not found.
NodeExists(ctx context.Context, node *corev1.Node) (bool, error)
// MakeNodeDrain handles adding the DRAIN state to the Slurm node.
MakeNodeDrain(ctx context.Context, node *corev1.Node, reason string) error
// MakeNodeUndrain handles removing the DRAIN state from the Slurm node.
MakeNodeUndrain(ctx context.Context, node *corev1.Node, reason string) error
// IsNodeDrain checks if the slurm node has the DRAIN state.
IsNodeDrain(ctx context.Context, node *corev1.Node) (bool, error)
// IsNodeDrained checks if the slurm node is DRAINED and eligible for removal.
IsNodeDrained(ctx context.Context, node *corev1.Node) (bool, error)
// IsNodeExternal checks if the slurm node is an external node
IsNodeExternal(ctx context.Context, node *corev1.Node) (bool, error)
// AddNode registers an external Kubernetes node in Slurm, or reconciles
// bridge-owned metadata when the Slurm node already exists.
AddNode(ctx context.Context, node *corev1.Node, nodeInfo *nodeinfo.NodeInfo, draInventory []dra.GRESInventory) error
// UpdateHybridNode reconciles the CPU fingerprint and GRES inventory in Extra
// for an existing hybrid node. It leaves external nodes unchanged.
UpdateHybridNode(ctx context.Context, node *corev1.Node, nodeInfo *nodeinfo.NodeInfo, draInventory []dra.GRESInventory) error
// DisableNodeGRESCompatibility removes the bridge-owned compatibility
// feature from an existing node without modifying its Extra inventory.
DisableNodeGRESCompatibility(ctx context.Context, node *corev1.Node) error
// NodeNeedsRecreate returns true when an external Slurm node's CPU, memory,
// or GRES configuration must be applied by draining and recreating it. For
// hybrid nodes, it validates the static GRES and CPU configuration and
// never requests recreation of the slurmd-managed node.
NodeNeedsRecreate(ctx context.Context, node *corev1.Node, nodeInfo *nodeinfo.NodeInfo, draInventory []dra.GRESInventory) (bool, error)
// RemoveNode removes a Kubernetes node from Slurm.
RemoveNode(ctx context.Context, node *corev1.Node) error
}
func NewControl ¶
func NewControl(client slurmclient.Client) SlurmControlInterface