Bug 1678990

Summary: List VM's on a Compute resource gives 500 error
Product: Red Hat Satellite Reporter: hprakash
Component: Compute Resources - VMWareAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Jitendra Yejare <jyejare>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: akarimi, chrobert, mhulan
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-04 18:22:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description hprakash 2019-02-20 04:44:11 UTC
Description of problem:
'Virtual Machines' tab on the Compute Resources(type vmware) page shows-

There was an error listing VMs: 500 Internal Server Error

Version-Release number of selected component (if applicable):
satellite-6.4.1-1.el7sat.noarch
foreman-vmware-1.18.0.39-1.el7sat.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Compute Resources>vmware compute resoure> 'Virtual Machines' tab shows '500 Internal Server Error'

Expected results:
Instead of a generic 500 ISE, more accurate error should be propagated from vCenter to the Satellite webUI.

Additional info:
foreman production log shows-

Failed generating link using ["%2fvmfs%2fvolumes%3f6c30ea7e-f4c0c20d-6bea-3091404632fc%2f<VM-NAME>%2fVM-NAME", {:controller=>"compute_resources_vms", :action=>"show", :use_route=>"compute_resource_vm", :compute_resource_id=>#<Foreman::Model::Vmware id: 3, name: "Datacenter", description: "VMWare DC", url: "<datacenter.url.com>", user: "dc-user\\dc-pwd", password: +FILTERED+ uuid: "Datacenter", type: "Foreman::Model::Vmware", created_at: "2018-12-07 08:55:09", updated_at: "2019-01-24 13:35:04", attrs: {:setpw=>0, :display=>"vmrc", :pubkey_hash=>""}, email: nil, caching_enabled: true, domain: nil, http_proxy_id: nil>, :id=>nil}, {}]
ActionController::UrlGenerationError: No route matches {:action=>"show", :compute_resource_id=>#<Foreman::Model::Vmware id: 3, name: "Datacenter", description: "VMWare DC", url: "<datacenter.url.com>", user: "dc-user\\dc-pwd", password: +FILTERED+ uuid: "Datacenter", type: "Foreman::Model::Vmware", created_at: "2018-12-07 08:55:09", updated_at: "2019-01-24 13:35:04", attrs: {:setpw=>0, :display=>"vmrc", :pubkey_hash=>""}, email: nil, caching_enabled: true, domain: nil, http_proxy_id: nil>, :controller=>"compute_resources_vms", :id=>nil}, possible unmatched constraints: [:id]

above trace shows the reference to a disk file and not an real VM. After removing this reference from the compute resource, virtual machines tab is rendering fine.

Note: We have tried to reproduce the issue but in vain. Customer is also unable to provide the steps to reproduce it. Raising this BZ to check the possibility to handle such scenario by passing-on the the accurate error from vCenter to the Satellite webUI. Which would help user to let them know that there is something wrong with the vCenter configuration.

Comment 3 Chris Roberts 2020-03-04 18:22:07 UTC

*** This bug has been marked as a duplicate of bug 1804661 ***