Bug 1670373

Summary: Suspending VM in SSUI from service details resullts in unknown power state
Product: Red Hat CloudForms Management Engine Reporter: Antonin Pagac <apagac>
Component: UI - ServiceAssignee: Allen W <awight>
Status: CLOSED ERRATA QA Contact: Sudhir Mallamprabhakara <smallamp>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.9.8CC: bmidwood, dmetzger, lavenel, mshriver, obarenbo, simaishi
Target Milestone: GAKeywords: Reopened
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:35:20 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:

Description Antonin Pagac 2019-01-29 12:25:32 UTC
Description of problem:
Suspending a VM in SSUI results in an unknown power state. The VM itself does get suspended as can be seen in OPS UI and in VM details page in SSUI.

The VM can be powered back on in SSUI in VM details Power Operations dropdown. Power actions initiated from VM details page in SSUI seem to work as expected. The problem seems to be only in power state and power operations that can be seen and initiated from service details screen.

Version-Release number of selected component (if applicable):
5.9.8.0
5.10.0.32

How reproducible:
Always

Steps to Reproduce:
1. Create and order a service that provisions a VM
2. In SSUI, navigate to My Services -> <service name> to see service details
3. In Resources section, choose 'Suspend' from dropdown

Actual results:
Vm enters unknown power state; can't be powered back on; in OPS UI the VM is suspended

Expected results:
SSUI reports VM suspended

Additional info:
Using vmware infra provider

Comment 5 Allen W 2019-02-01 13:36:02 UTC
Thanks for the real quick IP Antonin!  So I checked this out, yeah start button on the resource is grayed out once you hit suspend (and its in an unknown power state) but you can still enable the resource by backing out to the "My Services" list and selecting "start" from the kebab.  

That being said, yeah unknown power state should probably not stop user from turning on a resource.... so here's a pr fixing the issue https://github.com/ManageIQ/manageiq-ui-service/pull/1524

Comment 7 Allen W 2019-02-11 12:39:32 UTC
Yep absolutely! the pr was merged.

Comment 8 CFME Bot 2019-02-15 02:03:53 UTC
New commit detected on ManageIQ/manageiq-ui-service/master:

https://github.com/ManageIQ/manageiq-ui-self_service/commit/ba366fd01ba9aa826540ce73a4340e564b5d6a26
commit ba366fd01ba9aa826540ce73a4340e564b5d6a26
Author:     Allen Wight <awight>
AuthorDate: Fri Feb  1 08:29:20 2019 -0500
Commit:     Allen Wight <awight>
CommitDate: Fri Feb  1 08:29:20 2019 -0500

    Suspended power_state is "suspended"

    fixes https://bugzilla.redhat.com/show_bug.cgi?id=1670373

 client/app/services/poweroperations.service.js | 2 +-
 client/app/services/poweroperations.service.spec.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comment 9 Antonin Pagac 2019-04-29 11:37:55 UTC
Appliance version 5.11.0.1.

I can now start the VM that has been suspended, all from service details screen.

Two points to mention:
 - Suspended action is now allowed for powered off VMs - bz 1704221
 - When suspended, the VM and Service still reports Unknown Power state - bz 1704226

Will move this one to VERIFIED.

Comment 13 errata-xmlrpc 2019-12-12 13:35:20 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/RHBA-2019:4199