Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatNodeReason ¶
Types ¶
type SlurmControlInterface ¶
type SlurmControlInterface interface {
// RefreshNodeCache forces the Node cache to be refreshed
RefreshNodeCache(ctx context.Context, nodeset *slinkyv1beta1.NodeSet) error
// UpdateNodeWithPodInfo handles updating the Node with its pod info
UpdateNodeWithPodInfo(ctx context.Context, nodeset *slinkyv1beta1.NodeSet, pod *corev1.Pod) error
// MakeNodeDrain handles adding the DRAIN state to the slurm node.
MakeNodeDrain(ctx context.Context, nodeset *slinkyv1beta1.NodeSet, pod *corev1.Pod, reason string, overrideReason bool) error
// MakeNodeUndrain handles removing the DRAIN state from the slurm node.
MakeNodeUndrain(ctx context.Context, nodeset *slinkyv1beta1.NodeSet, pod *corev1.Pod, reason string) error
// IsNodeDrain checks if the slurm node has the DRAIN state.
IsNodeDrain(ctx context.Context, nodeset *slinkyv1beta1.NodeSet, pod *corev1.Pod) (bool, error)
// IsNodeDrained checks if the slurm node is drained.
IsNodeDrained(ctx context.Context, nodeset *slinkyv1beta1.NodeSet, pod *corev1.Pod) (bool, error)
// IsNodeDownForUnresponsive checks if the slurm node is unresponsive
IsNodeDownForUnresponsive(ctx context.Context, nodeset *slinkyv1beta1.NodeSet, pod *corev1.Pod) (bool, error)
// IsNodeReasonOurs reports if the node reason was set by the operator.
IsNodeReasonOurs(ctx context.Context, nodeset *slinkyv1beta1.NodeSet, pod *corev1.Pod) (bool, error)
// CalculateNodeStatus returns the current state of the registered slurm nodes.
CalculateNodeStatus(ctx context.Context, nodeset *slinkyv1beta1.NodeSet, pods []*corev1.Pod) (SlurmNodeStatus, error)
// GetNodeDeadlines returns a map of node to its deadline time.Time calculated from running jobs.
GetNodeDeadlines(ctx context.Context, nodeset *slinkyv1beta1.NodeSet, pods []*corev1.Pod) (*timestore.TimeStore, error)
}
func NewSlurmControl ¶
func NewSlurmControl(clusters *clientmap.ClientMap) SlurmControlInterface
type SlurmNodeStatus ¶
type SlurmNodeStatus struct {
Total int32
// Base State
Allocated int32
Down int32
Error int32
Future int32
Idle int32
Mixed int32
Unknown int32
// Flag State
Completing int32
Drain int32
Fail int32
Invalid int32
InvalidReg int32
Maintenance int32
NotResponding int32
Undrain int32
// Per-node State as Conditions
NodeStates map[string][]corev1.PodCondition
}
Click to show internal directories.
Click to hide internal directories.