Bug 1402867

Summary: Prevent scaling down with scale provider
Product: Red Hat CloudForms Management Engine Reporter: Ronnie Rasouli <rrasouli>
Component: ProvidersAssignee: Scott Seago <sseago>
Status: CLOSED CURRENTRELEASE QA Contact: Dave Johnson <dajohnso>
Severity: high Docs Contact:
Priority: high    
Version: 5.6.0CC: jfrey, jhardy, obarenbo, simaishi, sseago
Target Milestone: GAKeywords: TestOnly
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: openstack
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1523855 1524653 (view as bug list) Environment:
Last Closed: 2018-06-21 20:57:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1523855, 1524653    

Description Ronnie Rasouli 2016-12-08 14:02:59 UTC
Description of problem:

We can scale down by using scale this provider option. 

By doing that there are missing validations of: node in maintenance mode, node has associated instances 

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

How reproducible:
100%

Steps to Reproduce:
1. login to CFME UI
2. go to scale this provider 
3. decrease the number of compute nodes from 2 to 1 

Actual results:

scale down is done without validation of maintenance mode and associated instances 

Expected results:
block scaling down with scale this provider action

Additional info:

Comment 3 CFME Bot 2017-12-06 13:40:16 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/0d5216ac8db36625e0a2ff33c089e11203f86fb0

commit 0d5216ac8db36625e0a2ff33c089e11203f86fb0
Author:     Scott Seago <sseago>
AuthorDate: Thu Nov 30 14:45:37 2017 -0500
Commit:     Scott Seago <sseago>
CommitDate: Tue Dec 5 09:39:19 2017 -0500

    bz 1402867: Prevent scale down in scaling UI
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1402867
    
    In the scaling UI, added checks to allow scaling up but not down.
    Scale down is handled explicitly via a separate UI action with
    validation around maintenance mode on the node and lack of active
    VMs.

 app/controllers/ems_infra_controller.rb | 4 ++++
 1 file changed, 4 insertions(+)