From 7d53baeb1adc8bd8e01877d716bb36ad0e7b98e6 Mon Sep 17 00:00:00 2001 From: yzamir Date: Wed, 6 Nov 2024 15:41:50 +0200 Subject: [PATCH] Make Guest information on vNICs is missing, cannot preserve static IPs a warning instead of critical error Signed-off-by: yzamir --- pkg/controller/plan/controller.go | 7 +++++++ pkg/controller/plan/validation.go | 4 ++-- pkg/lib/condition/condition.go | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pkg/controller/plan/controller.go b/pkg/controller/plan/controller.go index 661ba6196..1cf7649a8 100644 --- a/pkg/controller/plan/controller.go +++ b/pkg/controller/plan/controller.go @@ -326,6 +326,13 @@ func (r *Reconciler) execute(plan *api.Plan) (reQ time.Duration, err error) { conditionRequiresReQ := plan.Status.HasReQCondition() if plan.Status.HasBlockerCondition() || plan.Status.HasCondition(Archived) || conditionRequiresReQ { if conditionRequiresReQ { + r.Log.Info( + "Found a condition requiring re-reconcile.", + "plan", + path.Join( + plan.GetNamespace(), + plan.GetName())) + reQ = base.SlowReQ } return diff --git a/pkg/controller/plan/validation.go b/pkg/controller/plan/validation.go index 9800304c2..49dd1a71f 100644 --- a/pkg/controller/plan/validation.go +++ b/pkg/controller/plan/validation.go @@ -440,8 +440,8 @@ func (r *Reconciler) validateVM(plan *api.Plan) error { Type: VMMissingGuestIPs, Status: True, Reason: MissingGuestInfo, - Category: Critical, - Message: "Guest information on vNICs is missing, cannot preserve static IPs. Make sure VMware tools are installed and the VM is running.", + Category: Warn, + Message: "Guest information on vNICs is missing, cannot preserve static IPs. If this machine has static IP, make sure VMware tools are installed and the VM is running.", Items: []string{}, } missingCbtForWarm := libcnd.Condition{ diff --git a/pkg/lib/condition/condition.go b/pkg/lib/condition/condition.go index 6debe04ae..e7dda0b2c 100644 --- a/pkg/lib/condition/condition.go +++ b/pkg/lib/condition/condition.go @@ -321,7 +321,7 @@ func (r *Conditions) HasBlockerCondition() bool { // The collection contains blocker conditions that keep the plan reconciling. func (r *Conditions) HasReQCondition() bool { - return r.HasCondition(ValidatingVDDK) || r.HasCondition(VMMissingGuestIPs) || r.HasCondition(VMMissingChangedBlockTracking) + return r.HasCondition(ValidatingVDDK) || r.HasCondition(VMMissingChangedBlockTracking) } // The collection contains the `Ready` condition.