Bug 1306471

Summary: unable to bring VM out of retirement from details page
Product: Red Hat CloudForms Management Engine Reporter: Colin Arnott <carnott>
Component: UI - OPSAssignee: Roman Blanco <rblanco>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Shriver <mshriver>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: benglish, cpelland, dclarizi, hkataria, jhardy, jprause, mpovolny, mshriver, obarenbo, rblanco, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: vm:retirement
Fixed In Version: 5.8.0.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1306811 1346967 1427168 (view as bug list) Environment:
Last Closed: 2017-06-12 16:10:29 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:
Bug Depends On:    
Bug Blocks: 1306811, 1346967, 1427168    

Description Colin Arnott 2016-02-10 22:59:03 UTC
Description of problem:
for retired VMs, on details page the drop-down from Lifecycle shows `Set Retirement Date` greyed out, even for the superadmin. this prevents one from bringing a VM out of retirement.

Version-Release number of selected component (if applicable):
cfme-5.5.2.4-1.el7cf.x86_64

How reproducible:
very

Steps to Reproduce:
1. retire a VM
2. go to that VMs details page
3. click `Lifecycle`

Actual results:
`Set Retirement Date` is greyed out

Expected results:
for at least the superadmin, this field should not be greyed out, even for retired VMs

Workaround:
the `Set Retirement Date` field is not greyed out, when any instances is selected on the inventory page
1. select the retired VM
2. click `Lifecycle`
3. click `Set Retirement Date`
4. bring VM out of retirement, by setting retirement date in future

Comment 2 Greg McCullough 2016-02-11 14:07:07 UTC
Colin - Can you verify if the VM is orphaned or archived?  If either is true then the VM no longer exists on the provider and therefore cannot be un-retired.  Otherwise this is likely just a UI bug.

Comment 3 Colin Arnott 2016-02-11 14:37:28 UTC
I do not think that the retirement state machine is fully evoked to remove the VM from the provider. As such, the VM is in a `Retired` state, not `Orphaned` or `Archived`, and thus can be successfully un-retired.

Comment 9 Roman Blanco 2016-06-23 11:29:04 UTC
https://github.com/ManageIQ/manageiq/pull/7707

Comment 10 Roman Blanco 2016-09-09 15:10:27 UTC
Fixed in new PR: https://github.com/ManageIQ/manageiq/pull/11151.
The previous one is closed.

Comment 15 Roman Blanco 2017-02-16 18:22:46 UTC
https://github.com/ManageIQ/manageiq/pull/13947

Comment 16 Mike Shriver 2017-02-16 19:02:39 UTC
*** Bug 1422322 has been marked as a duplicate of this bug. ***

Comment 18 Satoe Imaishi 2017-02-27 13:56:08 UTC
PR: https://github.com/ManageIQ/manageiq-ui-classic/pull/453

Comment 20 Mike Shriver 2017-03-16 17:23:05 UTC
Testing in CFME 5.8.0.4, I'm seeing the lifecycle button disappear on the details page for retired VM's from rhevm and virtualcenter providers where the VM was completely removed from the provider.  Both details pages show 'Resources: Available' in the Properties table, but the Relationships show 'None'.

I thought the intent was for L:ifecycle->Set Retirement Date to be displayed even in the case where the VM is removed so that an admin can attempt to re-instate the VM.

Please comment on the intended UI behavior here for infrastructure VM's.

Comment 21 Mike Shriver 2017-03-16 19:59:17 UTC
Verification: The lifecycle Dropdown is working as intended/expected for cloud providers, allowing for resuming from retirement on the instance details page.

Comment 23 Roman Blanco 2017-03-22 18:54:13 UTC
> I thought the intent was for Lifecycle->Set Retirement Date to be displayed
> even in the case where the VM is removed so that an admin can attempt to re-instate the VM.

Right, this should be the correct behaviour.

Mike, could you send me steps how to let the "Lifecycle" button disappear, so I could check it?

Thank you,
Roman

Comment 24 Mike Shriver 2017-03-23 17:04:54 UTC
I believe the initial failure in verification on CFME 5.8.0.4 was due to a navigation error where the 'Archived' VMs were selected in the accordion pane.

Verified behavior on CFME 5.8.0.7 and CFME 5.8.0.4, the Lifecycle button was available and the 'Set Retirement Date' option enabled for cloud instances and infrastructure VMs retired through CFME.