Skip to content

Commit

Permalink
Make Guest information on vNICs is missing, cannot preserve static IP…
Browse files Browse the repository at this point in the history
…s a warning instead of critical error

Signed-off-by: yzamir <[email protected]>
  • Loading branch information
yaacov committed Dec 2, 2024
1 parent 4890e07 commit 7d53bae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions pkg/controller/plan/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/plan/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion pkg/lib/condition/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7d53bae

Please sign in to comment.