Bug 1272195 - oo-admin-ctl-app -c remove-gear , ignores min scale setting
oo-admin-ctl-app -c remove-gear , ignores min scale setting
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.2.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Vu Dinh
Jianwei Hou
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-15 13:52 EDT by Ryan Howe
Modified: 2015-12-17 12:11 EST (History)
7 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-17 12:11:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ryan Howe 2015-10-15 13:52:32 EDT
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@stest-demo.apps.paas.it/~/git/stest.git/
      SSH:        561fd346045486fa5a000002@stest-demo.apps.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 16:59:43 EDT
PR <https://github.com/openshift/origin-server/pull/6278> is submitted to fix this bug.
Comment 7 Ma xiaoqiang 2015-11-11 20:42:38 EST
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 12:11:16 EST
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.