Description of problem: Have a conversion host VM, that is configured successfully on CFME side. Removing the VM on RHV side. On CFME, there is no indication that this conversion host is no longer valid. (Seems CFME so not track VM status). And when trying to Delete this conversion host VM, in CFME UI, Conversion Hosts tab, there is no response. The VM keeps appearing as before, as a valid conversion host. Version-Release number of selected component (if applicable): CFME-5.11.4.1 RHV-4.3.7 Expected results: 1. Conversion host VM should track the VM status, so that if it becomes down, paused, removed, rebooted, conversion host can not still appear as a valid conversion host. 2. Delete a conversion host VM, on cases like described (VM removed), Should at least fail, on that the connection to VM fails. And if possible allow VM delete, as it no longer exist, and CFME inventory should reflect that. Additional info: This is probably relevant for Openstack too.
An invalid conversion host cannot be selected to run a conversion, so ask #1 is already covered. For the second point, we can add a condition here: https://github.com/ManageIQ/manageiq/blob/master/app/models/conversion_host/configurations.rb#L118, to not call the 'disable_conversion_host_role' method if the resource doesn't exist.
https://github.com/ManageIQ/manageiq/pull/20133
New commit detected on ManageIQ/manageiq/ivanchuk: https://github.com/ManageIQ/manageiq/commit/7e2c4a7386309067db9a069ee1a787d1ff924658 commit 7e2c4a7386309067db9a069ee1a787d1ff924658 Author: Adam Grare <agrare> AuthorDate: Wed May 13 12:36:49 2020 +0000 Commit: Adam Grare <agrare> CommitDate: Wed May 13 12:36:49 2020 +0000 Merge pull request #20133 from fdupont-redhat/v2v_bz_1810406 [V2V] Don't run Ansible playbook if conversion host resource is absent or archived (cherry picked from commit 5916d54d21a9ea3b32abbecb5479e19643fe2ad7) https://bugzilla.redhat.com/show_bug.cgi?id=1810406 app/models/conversion_host.rb | 6 + spec/models/conversion_host_spec.rb | 36 + 2 files changed, 42 insertions(+)
This fix is applicable for both conversion host & VM. Can be verified by enabling a conversion host. The remove the host from RHV. 1. Check that VM migration plan do not pick this host for migration. 2. Try to delete the conversion host, it should fail.
Verified as fixed with CFME 5.11.6.0 After removing host from RHV - the conversion host in CFME was removed, and is not listed in Rails Console As expected, the followed migration picked the other valid conversion host
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, 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/RHSA-2020:2480