Bug 1959306 - Validation does not detect host in maintenance mode
Summary: Validation does not detect host in maintenance mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: Controller
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 2.1.0
Assignee: Sam Lucidi
QA Contact: Amos Mastbaum
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-11 09:01 UTC by Amos Mastbaum
Modified: 2021-08-26 07:09 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-26 07:09:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2021:3278 0 None None None 2021-08-26 07:09:19 UTC

Description Amos Mastbaum 2021-05-11 09:01:49 UTC
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.

Comment 1 Sam Lucidi 2021-06-23 19:44:23 UTC
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

Comment 2 Fabien Dupont 2021-06-24 21:50:24 UTC
Please test with the mtv-operator-bundle-2.1.0-5 build / iib:85044.

Comment 3 Amos Mastbaum 2021-08-12 10:25:56 UTC
MTV 2.1.0-48 / IIB 97916
CNV 4.8.1-14

Comment 6 errata-xmlrpc 2021-08-26 07:09:08 UTC
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


Note You need to log in before you can comment on or make changes to this bug.