https://github.com/ManageIQ/manageiq-providers-ovirt/pull/77
https://github.com/ManageIQ/manageiq/pull/15807
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/92ed48acef771074e05c7e14c8c53a4d7401599e commit 92ed48acef771074e05c7e14c8c53a4d7401599e Author: Moti Asayag <masayag> AuthorDate: Mon Aug 14 15:39:36 2017 +0300 Commit: Moti Asayag <masayag> CommitDate: Tue Aug 15 14:37:59 2017 +0300 Fail with descriptive message when no EMS When no EMS is associated with a VM or template, the provision request fails with a non-descriptive message. Such case might happen when the VM or template were removed from the provider side, but still exist as archived on vmdb. The purpose of the PR is to provide a clear failure message when there is no EMS. https://bugzilla.redhat.com/show_bug.cgi?id=1471124 app/models/miq_provision_request.rb | 15 +++++++++-- spec/models/miq_provision_request_spec.rb | 45 +++++++++++++++++++------------ 2 files changed, 41 insertions(+), 19 deletions(-)
(In reply to CFME Bot from comment #6) > New commit detected on ManageIQ/manageiq/master: > https://github.com/ManageIQ/manageiq/commit/ > 92ed48acef771074e05c7e14c8c53a4d7401599e > > commit 92ed48acef771074e05c7e14c8c53a4d7401599e > Author: Moti Asayag <masayag> > AuthorDate: Mon Aug 14 15:39:36 2017 +0300 > Commit: Moti Asayag <masayag> > CommitDate: Tue Aug 15 14:37:59 2017 +0300 > > Fail with descriptive message when no EMS > > When no EMS is associated with a VM or template, the provision request > fails with a non-descriptive message. Such case might happen when the VM > or template were removed from the provider side, but still exist as > archived on vmdb. The purpose of the PR is to provide a clear failure > message when there is no EMS. > > https://bugzilla.redhat.com/show_bug.cgi?id=1471124 > > app/models/miq_provision_request.rb | 15 +++++++++-- > spec/models/miq_provision_request_spec.rb | 45 > +++++++++++++++++++------------ > 2 files changed, 41 insertions(+), 19 deletions(-) Satoe, note that only this PR should be backported to FINE. The PR from comment 4 (https://github.com/ManageIQ/manageiq-providers-ovirt/pull/77) is required for 5.9 and above.
New commit detected on ManageIQ/manageiq-providers-ovirt/master: https://github.com/ManageIQ/manageiq-providers-ovirt/commit/eb718552088ae50e9d5155486690530372c2e0c3 commit eb718552088ae50e9d5155486690530372c2e0c3 Author: Moti Asayag <masayag> AuthorDate: Mon Aug 14 14:28:19 2017 +0300 Commit: Moti Asayag <masayag> CommitDate: Mon Aug 14 14:28:19 2017 +0300 Fix allowed vlans to allow no provider A template might loose its association with a provider when a template is being removed from the provider. In that case the template will become archived or orphan and its ext_management_system will return nil. The service catalog filters such vms or templates. However, an existing service doesn't produce a meaningful error in such case. Letting the service to allow nil value for EMS at dialog load will produce a descriptive error when trying to provision. https://bugzilla.redhat.com/show_bug.cgi?id=1471124 .../manageiq/providers/redhat/infra_manager/provision_workflow.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Tested on CFME-5.9.0.14/RHV-4.1.8 When a template is deleted in RHV, that a Catalog is using, when ordering that Catalog, the Request last message is now: [EVM] VM [rhel72_10002] Step [CheckProvisioned] Status [Error Creating VM] Message [[OvirtSDK4::NotFoundError]: HTTP response code is 404. The response body is empty.] This message is better than before (mentioned in the bug description). However, it indicates a problem with creating the VM, but not that the template no longer exist. Moti, Was this the intended error message please? Thanks.
The scenario described should not happen when Bug 1511445 is fixed. The reason for that error is only due to the fact that there was an attempt to provision a VM from a template that was just removed from RHV, without that removal being reflected to MIQ. A full refresh and re-test the scenario will produce the expected error: "Error: Source Template/Vm with id [9180] has no EMS, unable to provision" Once bug 1511445 is fixed, an auto-target refresh will be triggered for the removed template which will produce the error message as above.
Verified that Error message saying "Error: Source Template/Vm with id [116] has no EMS, unable to provision" appears in evm.log and in UI. CFME: 5.9.0.17 RHV 4.1.9