Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7ad7e89
fix(vm): make condition messages user-friendly
fl64 Jun 30, 2026
897d126
fix(vmbda): make condition messages user-friendly
fl64 Jun 30, 2026
5574240
fix(vd): make condition messages user-friendly
fl64 Jun 30, 2026
2a0055d
fix(vi): make condition messages user-friendly
fl64 Jun 30, 2026
5c66cdb
fix(cvi): make condition messages user-friendly
fl64 Jun 30, 2026
3f2aeae
fix(vdsnapshot): fix grammar in condition messages
fl64 Jun 30, 2026
78fb85e
fix(vmsnapshot): fix grammar in condition messages
fl64 Jun 30, 2026
48f8f26
fix(vmbda): say the VirtualMachine is not running
fl64 Jun 30, 2026
5f564fa
fix(vmbda): keep the node name in the storage-availability message
fl64 Jun 30, 2026
9477ff3
fix(vi, cvi): unify image provisioning and image-lost wording
fl64 Jun 30, 2026
daf7219
fix(vd, vi, cvi, vmbda): make storage wording consistent
fl64 Jun 30, 2026
e800d8c
fix(vi): name the PersistentVolumeClaim in the bind-wait message
fl64 Jun 30, 2026
d150ba0
fix(vm, vd, vi, cvi): align wording across condition messages
fl64 Jun 30, 2026
4987f69
fix(vmbda): do not report a missing volume as not-ready
fl64 Jun 30, 2026
df27e99
fix(vm): add trailing period to provisioning condition messages
fl64 Jun 30, 2026
86d877d
fix(vm, vmclass, vmop, vdsnapshot): clean up condition message text
fl64 Jun 30, 2026
21165d1
fix(vd, vi, vdsnapshot): keep the lost object name in the message
fl64 Jun 30, 2026
1de05f8
fix(vmop): describe migration progress accurately, not as node moves
fl64 Jun 30, 2026
eaeb367
fix(usb, vmsop, dvcr): make user-facing condition messages clearer
fl64 Jun 30, 2026
3db4cdf
fix(vi): describe the PersistentVolumeClaim being prepared, not 'imag…
fl64 Jun 30, 2026
ab6a0b1
fix(vmbda): don't report a running VM as 'not running' on transient i…
fl64 Jun 30, 2026
38f2f83
fix(vd, vi, vdsnapshot): address PR review comments on condition mess…
fl64 Jun 30, 2026
92afada
fix(vmsop): satisfy staticcheck ST1005 on the secret-nil error
fl64 Jun 30, 2026
594636b
fix(vm): give actionable guidance in agent and class condition messages
fl64 Jun 30, 2026
36a20e8
fix(vm): clarify why live migration is blocked, with applicable guidance
fl64 Jun 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (h *ImagePresenceHandler) Handle(ctx context.Context, cvi *v1alpha2.Cluster
Generation(cvi.Generation).
Status(metav1.ConditionFalse).
Reason(cvicondition.ImageLost).
Message(fmt.Sprintf("Image %q not found in DVCR.", registryURL))
Message("The image data is no longer available and needs to be recreated.")

conditions.SetCondition(cb, &cvi.Status.Conditions)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (ds HTTPDataSource) Sync(ctx context.Context, cvi *v1alpha2.ClusterVirtualI
cvi.Status.Phase = v1alpha2.ImageProvisioning
cb.Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("DVCR Provisioner not found: create the new one.")
Message("Preparing to import the image.")

log.Info("Create importer pod...", "progress", cvi.Status.Progress, "pod.phase", "nil")

Expand Down Expand Up @@ -207,7 +207,7 @@ func (ds HTTPDataSource) Sync(ctx context.Context, cvi *v1alpha2.ClusterVirtualI

cb.Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("Import is in the process of provisioning to DVCR.")
Message("The image is being imported.")

cvi.Status.Phase = v1alpha2.ImageProvisioning
cvi.Status.Progress = ds.statService.GetProgress(cvi.GetUID(), pod, cvi.Status.Progress)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (ds ObjectRefDataSource) Sync(ctx context.Context, cvi *v1alpha2.ClusterVir
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("DVCR Provisioner not found: create the new one.")
Message("Preparing to import the image.")

log.Info("Ready", "progress", cvi.Status.Progress, "pod.phase", "nil")

Expand Down Expand Up @@ -245,7 +245,7 @@ func (ds ObjectRefDataSource) Sync(ctx context.Context, cvi *v1alpha2.ClusterVir
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.ProvisioningFailed).
Message("Failed to get stats from non-ready datasource: waiting for the DataSource to be ready.")
Message("Waiting for the source data to become ready.")
return reconcile.Result{}, nil
}

Expand Down Expand Up @@ -283,7 +283,7 @@ func (ds ObjectRefDataSource) Sync(ctx context.Context, cvi *v1alpha2.ClusterVir
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("Import is in the process of provisioning to DVCR.")
Message("The image is being imported.")

cvi.Status.Phase = v1alpha2.ImageProvisioning
cvi.Status.Target.RegistryURL = ds.statService.GetDVCRImageName(pod)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (ds ObjectRefVirtualDisk) Sync(ctx context.Context, cvi *v1alpha2.ClusterVi
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("DVCR Provisioner not found: create the new one.")
Message("Preparing to import the image.")

log.Info("Create importer pod...", "progress", cvi.Status.Progress, "pod.phase", "nil")

Expand Down Expand Up @@ -204,7 +204,7 @@ func (ds ObjectRefVirtualDisk) Sync(ctx context.Context, cvi *v1alpha2.ClusterVi
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("Import is in the process of provisioning to DVCR.")
Message("The image is being imported.")

cvi.Status.Phase = v1alpha2.ImageProvisioning
cvi.Status.Progress = ds.statService.GetProgress(cvi.GetUID(), pod, cvi.Status.Progress)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (ds ObjectRefVirtualDiskSnapshot) Sync(ctx context.Context, cvi *v1alpha2.C
cb.
Status(metav1.ConditionFalse).
Reason(vicondition.Provisioning).
Message("PVC has created: waiting to be Bound.")
Message("Restoring data from the snapshot. Waiting for the PersistentVolumeClaim to be Bound.")

cvi.Status.Progress = "0%"
cvi.Status.SourceUID = ptr.To(vs.UID)
Expand Down Expand Up @@ -226,7 +226,7 @@ func (ds ObjectRefVirtualDiskSnapshot) Sync(ctx context.Context, cvi *v1alpha2.C
cb.
Status(metav1.ConditionFalse).
Reason(vicondition.Provisioning).
Message("DVCR Provisioner not found: create the new one.")
Message("Preparing to import the image.")

log.Info("Create importer pod...", "progress", cvi.Status.Progress, "pod.phase", "nil")

Expand Down Expand Up @@ -274,7 +274,7 @@ func (ds ObjectRefVirtualDiskSnapshot) Sync(ctx context.Context, cvi *v1alpha2.C
cb.
Status(metav1.ConditionFalse).
Reason(vicondition.Provisioning).
Message("Waiting for PVC to be bound")
Message("Restoring data from the snapshot. Waiting for the PersistentVolumeClaim to be Bound.")

return reconcile.Result{RequeueAfter: time.Second}, nil
}
Expand Down Expand Up @@ -304,7 +304,7 @@ func (ds ObjectRefVirtualDiskSnapshot) Sync(ctx context.Context, cvi *v1alpha2.C
cb.
Status(metav1.ConditionFalse).
Reason(vicondition.Provisioning).
Message("Import is in the process of provisioning to DVCR.")
Message("The image is being imported.")

cvi.Status.Phase = v1alpha2.ImageProvisioning
cvi.Status.Progress = ds.statService.GetProgress(cvi.GetUID(), pod, cvi.Status.Progress)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (ds ObjectRefVirtualImageOnPvc) Sync(ctx context.Context, cvi *v1alpha2.Clu
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("DVCR Provisioner not found: create the new one.")
Message("Preparing to import the image.")

log.Info("Create importer pod...", "progress", cvi.Status.Progress, "pod.phase", "nil")

Expand Down Expand Up @@ -193,7 +193,7 @@ func (ds ObjectRefVirtualImageOnPvc) Sync(ctx context.Context, cvi *v1alpha2.Clu
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("Import is in the process of provisioning to DVCR.")
Message("The image is being imported.")

cvi.Status.Phase = v1alpha2.ImageProvisioning
cvi.Status.Progress = ds.statService.GetProgress(cvi.GetUID(), pod, cvi.Status.Progress)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (ds RegistryDataSource) Sync(ctx context.Context, cvi *v1alpha2.ClusterVirt
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("DVCR Provisioner not found: create the new one.")
Message("Preparing to import the image.")

log.Info("Create importer pod...", "progress", cvi.Status.Progress, "pod.phase", "nil")

Expand Down Expand Up @@ -212,7 +212,7 @@ func (ds RegistryDataSource) Sync(ctx context.Context, cvi *v1alpha2.ClusterVirt
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("Import is in the process of provisioning to DVCR.")
Message("The image is being imported.")

cvi.Status.Phase = v1alpha2.ImageProvisioning
cvi.Status.Progress = "0%"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (ds UploadDataSource) Sync(ctx context.Context, cvi *v1alpha2.ClusterVirtua
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("DVCR Provisioner not found: create the new one.")
Message("Preparing to import the image.")

log.Info("Create uploader pod...", "progress", cvi.Status.Progress, "pod.phase", nil)

Expand Down Expand Up @@ -222,7 +222,7 @@ func (ds UploadDataSource) Sync(ctx context.Context, cvi *v1alpha2.ClusterVirtua
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.Provisioning).
Message("Import is in the process of provisioning to DVCR.")
Message("The image is being imported.")

cvi.Status.Phase = v1alpha2.ImageProvisioning
cvi.Status.Progress = ds.statService.GetProgress(cvi.GetUID(), pod, cvi.Status.Progress)
Expand All @@ -239,7 +239,7 @@ func (ds UploadDataSource) Sync(ctx context.Context, cvi *v1alpha2.ClusterVirtua
cb.
Status(metav1.ConditionFalse).
Reason(cvicondition.WaitForUserUpload).
Message("Waiting for the user upload.")
Message("Waiting for the user to upload image data.")

cvi.Status.Phase = v1alpha2.ImageWaitForUserUpload
cvi.Status.Target.RegistryURL = ds.statService.GetDVCRImageName(pod)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (p *PostponeHandler[T]) Handle(ctx context.Context, obj T) (reconcile.Resul
cb := conditions.NewConditionBuilder(getReadyType(obj)).Generation(obj.GetGeneration())
cb.Status(metav1.ConditionFalse).
Reason(ProvisioningPostponedReason).
Message("DVCR is in garbage collection mode: wait until it finishes before creating provisioner.")
Message("DVCR is performing garbage collection. The operation is postponed and will continue automatically once it completes.")
conditions.SetCondition(cb, conditions.NewConditionsAccessor(obj).Conditions())
}
// Garbage collection enabled and resources are postponed: requeue to check garbage collection status later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (h *AttachedHandler) Handle(ctx context.Context, s state.NodeUSBDeviceState

attachedCondition := meta.FindStatusCondition(usbDevice.Status.Conditions, string(usbdevicecondition.AttachedType))
if attachedCondition == nil {
setAttachedCondition(current, &changed.Status.Conditions, metav1.ConditionFalse, nodeusbdevicecondition.AttachedAvailable, fmt.Sprintf("Attached condition not found in USBDevice %s/%s.", usbDevice.Namespace, usbDevice.Name))
setAttachedCondition(current, &changed.Status.Conditions, metav1.ConditionFalse, nodeusbdevicecondition.AttachedAvailable, fmt.Sprintf("Waiting for the attachment status of USBDevice %s/%s.", usbDevice.Namespace, usbDevice.Name))
return reconcile.Result{}, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ var _ = Describe("AttachedHandler", func() {
}, metav1.ConditionFalse, string(nodeusbdevicecondition.NoFreeUSBIPPort), "No free USBIP ports are available."),
Entry("missing attached condition falls back to available", "test-ns", &v1alpha2.USBDevice{
ObjectMeta: metav1.ObjectMeta{Name: "usb-device-1", Namespace: "test-ns"},
}, metav1.ConditionFalse, string(nodeusbdevicecondition.AttachedAvailable), "Attached condition not found in USBDevice test-ns/usb-device-1."),
}, metav1.ConditionFalse, string(nodeusbdevicecondition.AttachedAvailable), "Waiting for the attachment status of USBDevice test-ns/usb-device-1."),
)
})
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (s *SizePolicyService) CheckVMMatchedSizePolicy(vm *v1alpha2.VirtualMachine
}

if len(errs) > 0 {
return fmt.Errorf("sizing policy validation has failed: %w: %w", errors.Join(errs...), ErrSizingPolicyValidation)
return fmt.Errorf("does not match the VirtualMachineClass sizing policy: %w: %w", errors.Join(errs...), ErrSizingPolicyValidation)
}

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (h *LifecycleHandler) syncReady(ctx context.Context, s state.USBDeviceState
}

if nodeUSBDevice == nil {
setReadyCondition(current, &changed.Status.Conditions, metav1.ConditionFalse, usbdevicecondition.NotFound, "Corresponding NodeUSBDevice not found.", nil)
setReadyCondition(current, &changed.Status.Conditions, metav1.ConditionFalse, usbdevicecondition.NotFound, "The USB device is no longer present on its node.", nil)
return nil
}

Expand All @@ -106,7 +106,7 @@ func (h *LifecycleHandler) syncReady(ctx context.Context, s state.USBDeviceState

readyCondition := meta.FindStatusCondition(nodeUSBDevice.Status.Conditions, string(nodeusbdevicecondition.ReadyType))
if readyCondition == nil {
setReadyCondition(current, &changed.Status.Conditions, metav1.ConditionFalse, usbdevicecondition.NotReady, "Ready condition not found in NodeUSBDevice.", nil)
setReadyCondition(current, &changed.Status.Conditions, metav1.ConditionFalse, usbdevicecondition.NotReady, "Waiting for the USB device readiness to be determined.", nil)
return nil
}

Expand Down Expand Up @@ -247,8 +247,8 @@ func (h *LifecycleHandler) syncAttached(ctx context.Context, s state.USBDeviceSt
}

if !hasFreePort {
message := fmt.Sprintf("Device is requested by VirtualMachine %s/%s, but no free USBIP ports are available on node %s for speed %d.",
vm.Namespace, vm.Name, vm.Status.Node, changed.Status.Attributes.Speed)
message := fmt.Sprintf("The USB device is requested by VirtualMachine %s/%s, but node %s has no free USB passthrough capacity for this device.",
vm.Namespace, vm.Name, vm.Status.Node)
setAttachedCondition(current, &changed.Status.Conditions, metav1.ConditionFalse, usbdevicecondition.NoFreeUSBIPPort, message)
return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (h LifeCycleHandler) Handle(ctx context.Context, vd *v1alpha2.VirtualDisk)
cb.
Status(metav1.ConditionFalse).
Reason(vdcondition.StorageClassIsNotReady).
Message("Storage class is not ready.")
Message("The StorageClass is not ready.")
conditions.SetCondition(cb, &vd.Status.Conditions)

return reconcile.Result{}, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,13 +492,13 @@ func (h MigrationHandler) handleMigrateSync(ctx context.Context, vd *v1alpha2.Vi
Reason(vdcondition.MigratingWaitForTargetReadyReason)

if pvc == nil {
cb.Message("Target persistent volume claim is not found.")
cb.Message("The target PersistentVolumeClaim is not found.")
conditions.SetCondition(cb, &vd.Status.Conditions)
return nil
}

if pvc.Status.Phase == corev1.ClaimBound {
cb.Status(metav1.ConditionTrue).Reason(vdcondition.InProgress).Message("Target persistent volume claim is bound.")
cb.Status(metav1.ConditionTrue).Reason(vdcondition.InProgress).Message("The target PersistentVolumeClaim is Bound.")
conditions.SetCondition(cb, &vd.Status.Conditions)
return nil
}
Expand All @@ -509,7 +509,7 @@ func (h MigrationHandler) handleMigrateSync(ctx context.Context, vd *v1alpha2.Vi
storageClassName = *sc
}
if storageClassName == "" {
cb.Message("Target persistent volume claim is pending.")
cb.Message("The target PersistentVolumeClaim is pending.")
conditions.SetCondition(cb, &vd.Status.Conditions)
return nil
}
Expand All @@ -518,7 +518,7 @@ func (h MigrationHandler) handleMigrateSync(ctx context.Context, vd *v1alpha2.Vi
err = h.client.Get(ctx, types.NamespacedName{Name: storageClassName}, sc)
if err != nil {
if k8serrors.IsNotFound(err) {
cb.Message("Target persistent volume claim is pending, StorageClass is not found.")
cb.Message("The target PersistentVolumeClaim is pending; the StorageClass is not found.")
conditions.SetCondition(cb, &vd.Status.Conditions)
return nil
}
Expand All @@ -527,13 +527,13 @@ func (h MigrationHandler) handleMigrateSync(ctx context.Context, vd *v1alpha2.Vi

isWaitForFistConsumer := sc.VolumeBindingMode == nil || *sc.VolumeBindingMode == storagev1.VolumeBindingWaitForFirstConsumer
if isWaitForFistConsumer {
cb.Status(metav1.ConditionTrue).Reason(vdcondition.InProgress).Message("Target persistent volume claim is waiting for first consumer.")
cb.Status(metav1.ConditionTrue).Reason(vdcondition.InProgress).Message("The target PersistentVolumeClaim is waiting for the first consumer.")
conditions.SetCondition(cb, &vd.Status.Conditions)
return nil
}
}

cb.Message("Target persistent volume claim is not bound or not waiting for first consumer.")
cb.Message("Waiting for the target PersistentVolumeClaim to be provisioned.")
conditions.SetCondition(cb, &vd.Status.Conditions)
return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (h ResizingHandler) ResizeNeeded(
cb.
Status(metav1.ConditionFalse).
Reason(vdcondition.ResizingNotAvailable).
Message("Disk resizing is not allowed: Storage class is not ready")
Message("Disk resizing is not allowed: the StorageClass is not ready.")
conditions.SetCondition(cb, &vd.Status.Conditions)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func (ds HTTPDataSource) Sync(ctx context.Context, vd *v1alpha2.VirtualDisk) (re
}

vd.Status.Phase = v1alpha2.DiskProvisioning
setReadyConditionWithWFFCAccounting(vd, cb, metav1.ConditionFalse, vdcondition.Provisioning, "PVC Provisioner not found: create the new one.")
setReadyConditionWithWFFCAccounting(vd, cb, metav1.ConditionFalse, vdcondition.Provisioning, "Preparing the disk storage.")

return reconcile.Result{RequeueAfter: time.Second}, nil
case dvQuotaNotExceededCondition != nil && dvQuotaNotExceededCondition.Status == corev1.ConditionFalse:
Expand All @@ -279,7 +279,7 @@ func (ds HTTPDataSource) Sync(ctx context.Context, vd *v1alpha2.VirtualDisk) (re
return reconcile.Result{}, nil
case pvc == nil:
vd.Status.Phase = v1alpha2.DiskProvisioning
setReadyConditionWithWFFCAccounting(vd, cb, metav1.ConditionFalse, vdcondition.Provisioning, "PVC not found: waiting for creation.")
setReadyConditionWithWFFCAccounting(vd, cb, metav1.ConditionFalse, vdcondition.Provisioning, "Waiting for the PersistentVolumeClaim to be created.")
return reconcile.Result{RequeueAfter: time.Second}, nil
case ds.diskService.IsImportDone(dv, pvc):
log.Info("Import has completed", "dvProgress", dv.Status.Progress, "dvPhase", dv.Status.Phase, "pvcPhase", pvc.Status.Phase)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (ds RegistryDataSource) Sync(ctx context.Context, vd *v1alpha2.VirtualDisk)
return reconcile.Result{}, err
}
vd.Status.Phase = v1alpha2.DiskProvisioning
setReadyConditionWithWFFCAccounting(vd, cb, metav1.ConditionFalse, vdcondition.Provisioning, "PVC Provisioner not found: create the new one.")
setReadyConditionWithWFFCAccounting(vd, cb, metav1.ConditionFalse, vdcondition.Provisioning, "Preparing the disk storage.")

return reconcile.Result{RequeueAfter: time.Second}, nil
case dvQuotaNotExceededCondition != nil && dvQuotaNotExceededCondition.Status == corev1.ConditionFalse:
Expand All @@ -284,7 +284,7 @@ func (ds RegistryDataSource) Sync(ctx context.Context, vd *v1alpha2.VirtualDisk)
return reconcile.Result{}, nil
case pvc == nil:
vd.Status.Phase = v1alpha2.DiskProvisioning
setReadyConditionWithWFFCAccounting(vd, cb, metav1.ConditionFalse, vdcondition.Provisioning, "PVC not found: waiting for creation.")
setReadyConditionWithWFFCAccounting(vd, cb, metav1.ConditionFalse, vdcondition.Provisioning, "Waiting for the PersistentVolumeClaim to be created.")
return reconcile.Result{RequeueAfter: time.Second}, nil
case ds.diskService.IsImportDone(dv, pvc):
log.Info("Import has completed", "dvProgress", dv.Status.Progress, "dvPhase", dv.Status.Phase, "pvcPhase", pvc.Status.Phase)
Expand Down
Loading
Loading