Bug 1490639

Summary: Automate Script Fails in Service UI with VM Record Not Found
Product: Red Hat CloudForms Management Engine Reporter: myoder
Component: UI - ServiceAssignee: Allen W <awight>
Status: CLOSED ERRATA QA Contact: Shveta <sshveta>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8.0CC: dclarizi, jhardy, myoder, obarenbo, simaishi
Target Milestone: GAKeywords: Reopened
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1507818 (view as bug list) Environment:
Last Closed: 2018-03-01 13:17:22 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: 1507818    

Description myoder 2017-09-11 23:09:12 UTC
Description of problem:
Automate script is failing in the Self Service UI with a RecordNotFound for a VM [1].  This issue isn't present in the Classic Admin UI.  It seems the Self Service UI is making API requests against the wrong vm id.  When I tracked it down, the instance had an id 99r464, but the API request was for 99r906.  Also noticed the instances are marked with status 'Retired' in the Self Service UI, when they are not in the Admin UI.

[1]
[----] E, [2017-09-06T09:43:28.540628 #11080:196c868] ERROR -- : MIQ(Api::VmsController.api_error) API Error
[----] E, [2017-09-06T09:43:28.540777 #11080:196c868] ERROR -- : MIQ(Api::VmsController.api_error) ActiveRecord::RecordNotFound: Couldn't find Vm with 'id'=99000000000906 [WHERE "vms"."type" IN ('Vm', 'ManageIQ::Providers::CloudManager::Vm', 'ManageIQ::Providers::InfraManager::Vm', 'VmServer', 'ManageIQ::Providers::Azure::CloudManager::Vm', 'ManageIQ::Providers::Google::CloudManager::Vm', 'ManageIQ::Providers::Openstack::CloudManager::Vm', 'ManageIQ::Providers::Amazon::CloudManager::Vm', 'ManageIQ::Providers::Vmware::CloudManager::Vm', 'ManageIQ::Providers::Microsoft::InfraManager::Vm', 'ManageIQ::Providers::Redhat::InfraManager::Vm', 'VmXen', 'ManageIQ::Providers::Vmware::InfraManager::Vm') AND "vms"."template" = $1]


Version-Release number of selected component (if applicable):
CFME 5.8.1.5

How reproducible:
customer environment

Steps to Reproduce:
1. 
2.
3.

Actual results:
SSUI fails to find VM record.

Expected results:
SSUI should find the VM record

Additional info:

Comment 3 Allen W 2017-09-12 16:54:15 UTC
Hi!  Thanks for noticing this bug! Would it be possible for you to provide an ip address or steps to reproduce this issue ?

Comment 4 Allen W 2017-09-12 16:54:21 UTC
Hi!  Thanks for noticing this bug! Would it be possible for you to provide an ip address or steps to reproduce this issue ?

Comment 5 Allen W 2017-09-13 14:15:49 UTC
SOOOOO this was fixed and backported here, https://github.com/ManageIQ/manageiq-ui-service/pull/856 unsure of this fix made it into 5.8.1 or if its coming up in 5.8.2, can anyone provide details?

Comment 9 Milan Falešník 2018-01-05 10:30:03 UTC
Verified in 5.9.0.15. There was no issue executing actions via buttons against a VM in the Self-Service UI.

Comment 12 errata-xmlrpc 2018-03-01 13:17:22 UTC
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-2018:0380