Bug 1272195 - oo-admin-ctl-app -c remove-gear , ignores min scale setting
Summary: oo-admin-ctl-app -c remove-gear , ignores min scale setting
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Vu Dinh
QA Contact: Jianwei Hou
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-15 17:52 UTC by Ryan Howe
Modified: 2015-12-17 17:11 UTC (History)
7 users (show)

Fixed In Version: openshift-origin-broker-util-1.37.4.1-1.el6op
Doc Type: Bug Fix
Doc Text:
Previously, the `oo-admin-ctl-app` command did not check the min_limit on the group_overrides while it was removing a gear from an application. This made it possible for a gear to be removed from a scalable application beyond the min_limit. This bug fix updates the `oo-admin-ctl-app` command to check the min_limit before removing a gear from a scalable application. As a result, the `remove-gear` command now fails if the number of gears have already reached the min_limit.
Clone Of:
Environment:
Last Closed: 2015-12-17 17:11:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2666 0 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 2.2.8 security, bug fix, and enhancement update 2015-12-17 22:07:54 UTC

Description Ryan Howe 2015-10-15 17:52:32 UTC
Description of problem:

- oo-admin-ctl-app -c remove-gear , ignores min scale setting and removes gear anyways. Application still shows minimum set even when actual number of gears is lower than minimum  

Version-Release number of selected component (if applicable):
Tested on 2.2.6

How reproducible:
100%

Steps to Reproduce:
- Steps at bottom 

Actual results:
Gear gets destroyed but keeps min set higher the actual number of gears. 

Expected results:
Either does not allow, or sets new min. 


Additional info:
#####
    # rhc app create stest php-5.4 -s
    # rhc cartridge scale php-5.4 --app stest --min 3
    This operation will run until the application is at the minimum scale and may take several minutes.
    Setting scale range for php-5.4 ... done
     
    php-5.4 (PHP 5.4)
    -----------------
      Scaling: x3 (minimum: 3, maximum: available) on small gears
     
    # oo-app-info -a stest
    Loading broker environment... Done.
     
    ================================================================================
     
          Login:         demo
          Plan:           ()
     
          App Name:      stest
          App UUID:      561fd346045486fa5a000002
          Creation Time: 2015-10-15 04:24:39 PM
          URL:           http://stest-demo.apps.paas.it
       
          Group Instance[0]:
              Components:
                  Cartridge Name: php-5.4
                  Component Name: php-5.4
               Gear[0]
                  Server Identity: node1.paas.it
                  Gear UUID:       561fd346045486fa5a000002
                  Gear UID:        5207
               Gear[1]
                  Server Identity: node1.paas.it
                  Gear UUID:       561fd3b2045486fa5a000024
                  Gear UID:        4408
               Gear[2]
                  Server Identity: node1.paas.it
                  Gear UUID:       561fd3c20454864967000003
                  Gear UID:        3816
             
          Current DNS
          -----------
         stest-demo.apps.paas.it is an alias for node1.paas.it.
         node1.paas.it has address 192.168.110.3
       
    ================================================================================
     
    # oo-admin-ctl-app -c remove-gear -a stest -l demo --gear_uuid 561fd3b2045486fa5a000024
    Success
     
    # oo-app-info -a stest
    Loading broker environment... Done.
     
    ================================================================================
     
          Login:         demo
          Plan:           ()
     
          App Name:      stest
          App UUID:      561fd346045486fa5a000002
          Creation Time: 2015-10-15 04:24:39 PM
          URL:           http://stest-demo.apps.paas.it
       
          Group Instance[0]:
              Components:
                  Cartridge Name: php-5.4
                  Component Name: php-5.4
               Gear[0]
                  Server Identity: node1.paas.it
                  Gear UUID:       561fd346045486fa5a000002
                  Gear UID:        5207
               Gear[1]
                  Server Identity: node1.paas.it
                  Gear UUID:       561fd3c20454864967000003
                  Gear UID:        3816
             
          Current DNS
          -----------
         stest-demo.apps.paas.it is an alias for node1.paas.it.
         node1.paas.it has address 192.168.110.3
       
    ================================================================================
     
    # rhc app show stest
    stest @ http://stest-demo.apps.paas.it/ (uuid: 561fd346045486fa5a000002)
    ------------------------------------------------------------------------
      Domain:     demo
      Created:    12:24 PM
      Gears:      2 (defaults to small)
      Git URL:    ssh://561fd346045486fa5a000002.paas.it/~/git/stest.git/
      SSH:        561fd346045486fa5a000002.paas.it
      Deployment: auto (on git push)
     
      haproxy-1.4 (Web Load Balancer)
      -------------------------------
        Gears: Located with php-5.4
     
      php-5.4 (PHP 5.4)
      -----------------
        Scaling: x2 (minimum: 3, maximum: available) on small gears
     
    # rhc cartridge-status php-5.4 --app stest
    RESULT:
    Application is running
    Application is running

Comment 2 Vu Dinh 2015-10-19 20:59:43 UTC
PR <https://github.com/openshift/origin-server/pull/6278> is submitted to fix this bug.

Comment 7 Ma xiaoqiang 2015-11-12 01:42:38 UTC
Check on puddle [2.2.8/2015-11-11.1]

# rhc app create stest php-5.4 -s
# rhc cartridge scale php-5.4 --app stest --min 3
# oo-app-info -a stest
#  oo-admin-ctl-app -c remove-gear -a stest -l xiaom --gear_uuid  xiaom-stest-2
Gear xiaom-stest-2 cannot be removed as the application has already reached the minimum gear limit of 3.
# rhc app-scale-up  stest
#  oo-admin-ctl-app -c remove-gear -a stest -l xiaom --gear_uuid  xiaom-stest-2
Success
#  oo-admin-ctl-app -c remove-gear -a stest -l xiaom --gear_uuid  xiaom-stest-3
Gear xiaom-stest-3 cannot be removed as the application has already reached the minimum gear limit of 3.

Move it to VERIFIED

Comment 9 errata-xmlrpc 2015-12-17 17:11:16 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://rhn.redhat.com/errata/RHSA-2015-2666.html


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