Created attachment 1592826 [details] Unexpcted error on template details page Description of problem: Version-Release number of selected component (if applicable): 5.11.0.15.20190718144823_3d0108f How reproducible: 100% Steps to Reproduce: 1. Add scvmm provider and go to details page 2. Click on 'Templates' from 'Relationships' table 3. Click on any template(like centos-tmpl, fedora-small-tmpl etc) Actual results: Unexpected error encountered Expected results: Additional info: - Working as expected on 5.10z
I was able to reproduce this to the model, possibly a provider issue as it is happening for SCVMM only. The VmOrTemplate#find is behaving inconsistently. When calling with a VMware template: VmOrTemplate.find(196) -> returns `ManageIQ::Providers::Vmware::InfraManager::Template` When calling with a SCVMM template: VmOrTemplate.find(246) -> returns `MiqTemplate` Looking into this a little bit more, the `type` field for the given template record is set to `MiqTemplate` instead of `ManageIQ::Providers::Microsoft::InfraManager::Template`. This causes the `ManageIQ::Providers::Microsoft::InfraManager::Template` class return no templates at all.
https://github.com/ManageIQ/manageiq-providers-scvmm/pull/127
New commit detected on ManageIQ/manageiq-providers-scvmm/master: https://github.com/ManageIQ/manageiq-providers-scvmm/commit/fb097ec4a0388e86e2c726e6359d3ccad5d2191d commit fb097ec4a0388e86e2c726e6359d3ccad5d2191d Author: Adam Grare <agrare> AuthorDate: Wed Jul 24 12:01:51 2019 -0400 Commit: Adam Grare <agrare> CommitDate: Wed Jul 24 12:01:51 2019 -0400 Fix the SCVMM template type, was just MiqTemplate The auto-model-class feature of the persister builder wasn't picking up the class correctly because it was looking for ManageIQ::Providers::Microsoft::InfraManager::MiqTemplate instead of ...InfraManager::Template. This caused the templates that got created to have the base model type of MiqTemplate. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1732349 app/models/manageiq/providers/microsoft/inventory/persister/infra_manager.rb | 2 +- spec/models/manageiq/providers/microsoft/infra_manager/refresher_spec.rb | 12 + 2 files changed, 13 insertions(+), 1 deletion(-)
New commit detected on ManageIQ/manageiq-providers-scvmm/ivanchuk: https://github.com/ManageIQ/manageiq-providers-scvmm/commit/cd02fe23c4fdb9030e4585f08a82f581809e9ebb commit cd02fe23c4fdb9030e4585f08a82f581809e9ebb Author: Gregg Tanzillo <gtanzill> AuthorDate: Wed Jul 24 13:59:23 2019 -0400 Commit: Gregg Tanzillo <gtanzill> CommitDate: Wed Jul 24 13:59:23 2019 -0400 Merge pull request #127 from agrare/bz_1732349_fix_scvmm_template_type Fix the SCVMM template type, was just MiqTemplate (cherry picked from commit 3050c8a269a34540ef91aec2518752e0e963d02b) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1732349 app/models/manageiq/providers/microsoft/inventory/persister/infra_manager.rb | 2 +- spec/models/manageiq/providers/microsoft/infra_manager/refresher_spec.rb | 12 + 2 files changed, 13 insertions(+), 1 deletion(-)
*** Bug 1726426 has been marked as a duplicate of this bug. ***
scvmm templates aren't available in provisioning dialog and in Compute->Infrastructure->Virtual Machines->Templates as well.
Verified in SCVMM 5.11.0.17: Templates are showing up in all expected locations and I can view their details pages without hitting the unexpected error.