From b76e845483e002b17b8c69677e54c3ecea5d3260 Mon Sep 17 00:00:00 2001 From: "dmitry.lopatin" Date: Wed, 25 Sep 2024 21:53:06 +0300 Subject: [PATCH] fix(vm): flag need_restart if change ip Signed-off-by: dmitry.lopatin --- .../pkg/controller/vm/internal/sync_kvvm.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/images/virtualization-artifact/pkg/controller/vm/internal/sync_kvvm.go b/images/virtualization-artifact/pkg/controller/vm/internal/sync_kvvm.go index 3b4794640..6dc509681 100644 --- a/images/virtualization-artifact/pkg/controller/vm/internal/sync_kvvm.go +++ b/images/virtualization-artifact/pkg/controller/vm/internal/sync_kvvm.go @@ -123,8 +123,12 @@ func (h *SyncKvvmHandler) isWaiting(vm *virtv2.VirtualMachine) bool { if c.Status != metav1.ConditionTrue && c.Reason != vmcondition.ReasonWaitingForProvisioningToPVC.String() { return true } - case vmcondition.TypeIPAddressReady, - vmcondition.TypeProvisioningReady, + case vmcondition.TypeIPAddressReady: + if c.Status != metav1.ConditionTrue && c.Reason != vmcondition.ReasonIPAddressNotAssigned.String() { + return true + } + + case vmcondition.TypeProvisioningReady, vmcondition.TypeClassReady: if c.Status != metav1.ConditionTrue { return true