This bug was initially created as a copy of Bug #1940896, because it expands its scope. Description of problem: When watching inventory resources, each controller has a deliberately narrow set of changes it's interested in. For Host, it only triggers a Host CR reconcile when a referenced (vCenter) Host's path and/or name changes. We need to expand to include changes to: maintenance mode. However, we currently don't validate maintenance-mode in the back-end so even if the Plan reconcile is triggered by the change in maintenance-mode, the Host CR will remain READY and the Plan will execute. Steps to Reproduce: 1. Create a Plan with multiple VMs on multiple hosts. 2. Check that the plan is in Ready condition. 3. Put one of the host the VMs belong to in maintenance mode. Actual results: Nothing happens. The plan remains in Ready condition. Expected results: The change in the inventory should result in the Plan CR being reconciled and the Critical condition set. Additional info: This requires adding a validation on the hosts maintenance mode in the Plan CR validation. This requires adding an external watch on the host maintenance mode for the Plan.
This PR causes the inventory to consider the value of InMaintenanceMode when determining whether to update a Host. It also adds a Warn condition to the Plan if any of the VMs on the Plan belong to hosts in maintenance mode. This is a warning rather than critical because we'd prefer to warn rather than block, and the failed VMs can be retried later. https://github.com/konveyor/forklift-controller/pull/289
Please test with the mtv-operator-bundle-2.1.0-5 build / iib:85044.
MTV 2.1.0-48 / IIB 97916 CNV 4.8.1-14
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Migration Toolkit for Virtualization 2.1.0), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2021:3278