Bug 1394202 - SSUI Power Operation : Start operation on a service shows "Powering Up" State of VM forever
Summary: SSUI Power Operation : Start operation on a service shows "Powering Up" State...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.0
Assignee: Drew Bomhof
QA Contact: Shveta
URL:
Whiteboard: ssui:power
Depends On:
Blocks: 1402995
TreeView+ depends on / blocked
 
Reported: 2016-11-11 11:49 UTC by Shveta
Modified: 2017-06-12 16:28 UTC (History)
9 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1402995 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:28:59 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Powering Up (207.01 KB, image/png)
2016-11-11 11:49 UTC, Shveta
no flags Details

Description Shveta 2016-11-11 11:49:54 UTC
Created attachment 1219729 [details]
Powering Up

Description of problem:


Version-Release number of selected component (if applicable):
5.7.0.10-beta3.20161109111947_9a61b18 

How reproducible:


Steps to Reproduce:
1. create a service.Power Off the VM. Login in SSUI
2. Start the service. VM shows "Powering up" state forever.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Shveta 2016-12-06 11:52:32 UTC
Not seeing this issue anymore
Closing

Comment 5 Drew Bomhof 2016-12-08 17:03:20 UTC
There was work on a number of BZ's regarding different areas of the issue discussed here.

This PR addresses the issues in regards to forced calculation of a Power State verses looking at only a cached version.

https://github.com/ManageIQ/manageiq/pull/12963

Comment 8 Drew Bomhof 2016-12-21 19:10:38 UTC
SUI PR - https://github.com/ManageIQ/manageiq-ui-service/pull/406 - Also ties into this bug.

Comment 9 CFME Bot 2016-12-21 19:33:14 UTC
New commit detected on ManageIQ/manageiq-ui-service/master:
https://github.com/ManageIQ/manageiq-ui-self_service/commit/79dfa6bc0c2c8b17e3b2311dfa71b5f28f521d6d

commit 79dfa6bc0c2c8b17e3b2311dfa71b5f28f521d6d
Author:     Drew Bomhof <dbomhof>
AuthorDate: Wed Dec 21 14:03:11 2016 -0500
Commit:     Drew Bomhof <dbomhof>
CommitDate: Wed Dec 21 14:03:11 2016 -0500

    Pull power_status directly from the virtual column
    
    Power Status (unlike power_state) was being pulled from the cached options
    hash, and forced the page to be reloaded after live calculating the power state.
    
    After the reload the power_status would correctly show the 'green' or 'red' indicator.
    
    This fix instantly updates the power_status indicator when the power_state is recalculated: e.g.
    At every service detail page load.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1394202

 client/app/services/poweroperations.service.js     | 26 +++++++++++-----------
 client/app/states/services/details/details.html    | 14 ++++++------
 .../app/states/services/details/details.state.js   |  1 +
 tests/services-details.state.spec.js               | 20 ++++++++---------
 tests/services-list.state.spec.js                  | 20 ++++++++---------
 5 files changed, 41 insertions(+), 40 deletions(-)

Comment 10 CFME Bot 2017-01-23 22:01:18 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/6661b89dd6367aa781b56bac83e07338404e57bb

commit 6661b89dd6367aa781b56bac83e07338404e57bb
Author:     Drew Bomhof <dbomhof>
AuthorDate: Fri Dec 16 17:42:29 2016 -0500
Commit:     Drew Bomhof <dbomhof>
CommitDate: Mon Jan 23 16:29:59 2017 -0500

    Allow a service power state to correctly handle nil actions
    
    In the case where the :start_action or :stop_action was not set on a service
    we need to assume the user would want a :start_action to equal 'Power On'
    and subsequently a nil :stop_action would equal a 'Power Off'
    
    This change only affects services where none of the start or stop actions were set
    
    This change also correctly handles passing back the
    power state and power status for atomic services
    
    If a user sets any of the service actions then we assume they meant to leave some of them as 'Do Nothing'
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1394202

 app/models/service.rb       | 34 +++++++++++++++++----
 spec/models/service_spec.rb | 74 +++++++++++++++++++++++++++++++++++++++------
 2 files changed, 92 insertions(+), 16 deletions(-)

Comment 11 Shveta 2017-04-19 19:57:42 UTC
Fixed.
Verified in 5.8.0.11-beta2.20170418170914_a53d2a7


Note You need to log in before you can comment on or make changes to this bug.