Bug 1684649
| Summary: | Clicking on Network -> Topology Produces Error 500 Internal Server Error | |||
|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Ryan Spagnola <rspagnol> | |
| Component: | UI - OPS | Assignee: | Robin Knaur <rknaur> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Matouš Mojžíš <mmojzis> | |
| Severity: | high | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | |
| Priority: | high | |||
| Version: | 5.9.7 | CC: | bmidwood, dmetzger, hkataria, juwatts, lavenel, mpovolny, mshriver, obarenbo, rknaur, rmanes | |
| Target Milestone: | GA | Keywords: | TestOnly, ZStream | |
| Target Release: | 5.11.0 | |||
| Hardware: | All | |||
| OS: | All | |||
| Whiteboard: | ||||
| Fixed In Version: | 5.11.0.1 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1693730 (view as bug list) | Environment: | ||
| Last Closed: | 2019-12-13 15:09:05 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | Bug | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | CFME Core | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1692488, 1693730 | |||
|
Description
Ryan Spagnola
2019-03-01 18:26:08 UTC
This occurs when VM's do not have an ext_management_system present in the record. We fail here when an object of type ManageIQ::Providers::Amazon::CloudManager::Vm doesn't have said field:
if entity.kind_of?(Host) || entity.kind_of?(Vm)
data[:provider] = entity.ext_management_system.name <---- here
end
Ostensibly, we could just band-aid this by setting all VM's with nil ext_management_system fields to whatever the proper EMS is (in our case, we only have one AWS provider, so it is easy):
ems = ManageIQ::Providers::Amazon::CloudManager.find_by(:name=>"AWS_PROVIDER_NAME"); ManageIQ::Providers::Amazon::CloudManager::Vm.all.each {|vm| if vm.ext_management_system == nil; vm.ext_management_system = ems; vm.save; end };
Is there any problem with doing this? I would expect every VM to require having an ext_management_system, but is there a valid reason why it might not have it, or why we shouldn't just run the above?
For posterities's sake, if I'm following along correctly, it looks like orphaned VM's without an ext_management_system is supported, and the commit above is to address that. New commit detected on ManageIQ/manageiq-ui-classic/master: https://github.com/ManageIQ/manageiq-ui-classic/commit/3f4ae4504847dcba8771be01aa2237ac3ce68086 commit 3f4ae4504847dcba8771be01aa2237ac3ce68086 Author: PanSpagetka <rknaur> AuthorDate: Thu Mar 14 06:19:16 2019 -0400 Commit: PanSpagetka <rknaur> CommitDate: Thu Mar 14 06:19:16 2019 -0400 Add safeguard for VMs without ext_management_system https://bugzilla.redhat.com/show_bug.cgi?id=1684649 app/services/network_topology_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Verified in 5.11.0.11.20190625161125_392c61e Verification Steps: 1) Archived a VM by remsoving the provider (can also be achieved by retiring a VM) 2) Navigate to Networks-> Topology 500 Internal Server is not observed, Topology is loaded correctly. Verified in 5.11.0.11.20190625161125_392c61e Verification Steps: 1) Archived a VM by removing the provider (can also be achieved by retiring a VM) 2) Navigate to Networks-> Topology 500 Internal Server is not observed, Topology is loaded correctly. |