Skip to content

Commit

Permalink
fix(vm): del comments and lint
Browse files Browse the repository at this point in the history
Signed-off-by: Daniil Antoshin <[email protected]>
  • Loading branch information
danilrwx committed Nov 27, 2024
1 parent 86fd508 commit 5d294e3
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ func (h LifeCycleHandler) ensureVirtualDiskSnapshots(ctx context.Context, vmSnap
}
}

//nolint:staticcheck
vdSnapshotReady, _ := conditions.GetCondition(vdscondition.VirtualDiskSnapshotReadyType, vdSnapshot.Status.Conditions)
if vdSnapshotReady.Reason == vdscondition.VirtualDiskSnapshotFailed.String() || vdSnapshot.Status.Phase == virtv2.VirtualDiskSnapshotPhaseFailed {
return nil, fmt.Errorf("the virtual disk snapshot %q is failed: %w. %s", vdSnapshot.Name, ErrCannotTakeSnapshot, vdSnapshotReady.Message)
Expand Down Expand Up @@ -449,13 +448,11 @@ func (h LifeCycleHandler) ensureBlockDeviceConsistency(ctx context.Context, vm *
return fmt.Errorf("%w: waiting for the virtual disk %q to be %s", ErrVirtualDiskNotReady, vd.Name, virtv2.DiskReady)
}

//nolint:staticcheck
ready, _ := conditions.GetCondition(vdcondition.ReadyType, vd.Status.Conditions)
if ready.Status != metav1.ConditionTrue {
return fmt.Errorf("%w: waiting for the Ready condition of the virtual disk %q to be True", ErrVirtualDiskResizing, vd.Name)
}

//nolint:staticcheck
resizingReady, _ := conditions.GetCondition(vdcondition.ResizedType, vd.Status.Conditions)
if resizingReady.Reason == vdcondition.InProgress.String() {
return fmt.Errorf("%w: waiting for the virtual disk %q to be resized", ErrVirtualDiskResizing, vd.Name)
Expand Down

0 comments on commit 5d294e3

Please sign in to comment.