Skip to content

Commit

Permalink
fix inuse.go
Browse files Browse the repository at this point in the history
Signed-off-by: dmitry.lopatin <[email protected]>
  • Loading branch information
LopatinDmitr committed Oct 21, 2024
1 parent fd3ee61 commit 88b6e5e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ func (h InUseHandler) Handle(ctx context.Context, vd *virtv2.VirtualDisk) (recon
}
}

if inUseCondition.Status != metav1.ConditionTrue && inUseInRunningVirtualMachine && !inUseForCreateImage {
if inUseInRunningVirtualMachine && !inUseForCreateImage {
inUseCondition.Status = metav1.ConditionTrue
inUseCondition.Reason = vdcondition.InUseInRunningVirtualMachine
}

if inUseCondition.Status != metav1.ConditionTrue && inUseForCreateImage && !inUseInRunningVirtualMachine {
if inUseForCreateImage && !inUseInRunningVirtualMachine {
inUseCondition.Status = metav1.ConditionTrue
inUseCondition.Reason = vdcondition.InUseForCreateImage
}
Expand Down

0 comments on commit 88b6e5e

Please sign in to comment.