diff --git a/api/v1beta1/elfmachine_types.go b/api/v1beta1/elfmachine_types.go index 5e333f50..a7214fdf 100644 --- a/api/v1beta1/elfmachine_types.go +++ b/api/v1beta1/elfmachine_types.go @@ -80,11 +80,11 @@ type ElfMachineSpec struct { // +optional DiskGiB int32 `json:"diskGiB,omitempty"` - // GPUDevices is the list of GPUs used by the virtual machine. + // GPUDevices is the list of physical GPUs used by the virtual machine. // +optional GPUDevices []GPUPassthroughDeviceSpec `json:"gpuDevices,omitempty"` - // VGPUDevices is the list of vGPUs used by the virtual machine. + // VGPUDevices is the list of virtual GPUs used by the virtual machine. // +optional VGPUDevices []VGPUDeviceSpec `json:"vgpuDevices,omitempty"` diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_elfmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_elfmachines.yaml index ff18ca28..007b3c3d 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_elfmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_elfmachines.yaml @@ -77,7 +77,8 @@ spec: of the ElfDeploymentZone. type: string gpuDevices: - description: GPUDevices is the list of GPUs used by the virtual machine. + description: GPUDevices is the list of physical GPUs used by the virtual + machine. items: description: GPUPassthroughDeviceSpec defines virtual machine's GPU configuration @@ -202,7 +203,7 @@ spec: new machines. type: string vgpuDevices: - description: VGPUDevices is the list of vGPUs used by the virtual + description: VGPUDevices is the list of virtual GPUs used by the virtual machine. items: description: VGPUDeviceSpec defines virtual machine's VGPU configuration diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_elfmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_elfmachinetemplates.yaml index 811567f0..4be744ae 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_elfmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_elfmachinetemplates.yaml @@ -57,8 +57,8 @@ spec: to the name of the ElfDeploymentZone. type: string gpuDevices: - description: GPUDevices is the list of GPUs used by the virtual - machine. + description: GPUDevices is the list of physical GPUs used + by the virtual machine. items: description: GPUPassthroughDeviceSpec defines virtual machine's GPU configuration @@ -186,8 +186,8 @@ spec: to clone new machines. type: string vgpuDevices: - description: VGPUDevices is the list of vGPUs used by the - virtual machine. + description: VGPUDevices is the list of virtual GPUs used + by the virtual machine. items: description: VGPUDeviceSpec defines virtual machine's VGPU configuration diff --git a/controllers/elfmachine_controller_gpu.go b/controllers/elfmachine_controller_gpu.go index 06955586..4429b370 100644 --- a/controllers/elfmachine_controller_gpu.go +++ b/controllers/elfmachine_controller_gpu.go @@ -80,7 +80,7 @@ func (r *ElfMachineReconciler) selectHostAndGPUsForVM(ctx *context.MachineContex availableHosts := hosts.FilterAvailableHostsWithEnoughMemory(*service.TowerMemory(ctx.ElfMachine.Spec.MemoryMiB)) if len(availableHosts) == 0 { - ctx.Logger.V(2).Info("No available hosts for selecting GPUs") + ctx.Logger.V(2).Info("Waiting for enough available hosts") return nil, nil, nil } diff --git a/pkg/service/collections.go b/pkg/service/collections.go index 23c032ec..db3ca926 100644 --- a/pkg/service/collections.go +++ b/pkg/service/collections.go @@ -169,7 +169,9 @@ func (s Hosts) IDs() []string { return res } -// GPUVMInfos is a set of GPUVMInfos. +// GPUVMInfos is a set of GpuVMInfos. +// Key is the ID of GPU device. +// Value is the GpuVMInfo type with VMs and allocation details. type GPUVMInfos map[string]*models.GpuVMInfo // NewGPUVMInfos creates a GPUVMInfos. from a list of values.