Bug 1065318 - Failed to scale up app after control haproxy multiplier with oo-admin-ctl-app
Summary: Failed to scale up app after control haproxy multiplier with oo-admin-ctl-app
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-14 10:55 UTC by chunchen
Modified: 2016-09-30 02:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-12 03:07:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
broker haproxy multiplier log (27.70 KB, text/x-log)
2014-02-14 10:55 UTC, chunchen
no flags Details

Description chunchen 2014-02-14 10:55:41 UTC
Created attachment 863215 [details]
broker haproxy multiplier log

Description of problem:
It's failed to scale up app after control haproxy multiplier with oo-admin-ctl-app, will meet "comparison of Fixnum with nil failed" errors. Please refer to the logs at attachment.

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

How reproducible:
always

Steps to Reproduce:
1. Edit haproxy's manifest to increase it's max haproxy instances
Edit /usr/libexec/openshift/cartridges/haproxy/metadata/manifest.yml , set the value of 'Max' to 20, save and exit

2. Clear broker cache
oo-admin-broker-cache -c

3. Restart mcollective
/etc/init.d/ruby193-mcollective restart

4. Create a scalable application
rhc create-app php1s php-5.3 -s

5. On broker, control the haproxy multiplier with oo-admin-ctl-app, eg: set multiplier to 2
oo-admin-ctl-app -c set-multiplier -l jhou -a php1s --cartridge haproxy-1.4 --multiplier 2

6. Scale up the application 7 times from cli
rhc cartridg-scale php-5.3 -a php1s --min 7 --max -1

7. Check this app
rhc app show php1s

Actual results:
at step 6:
Setting scale range for php-5.3 ... 
Unable to complete the requested operation due to: comparison of Fixnum with nil failed
Reference ID: 803d14d0a54300d891689a318c0b4d8b

at step 7:
php1s @ http://php1s-cdm.dev.rhcloud.com/ (uuid: 52fde7e844edea1d1a000007)
--------------------------------------------------------------------------
  Domain:     cdm
  Created:    4:54 AM
  Gears:      1 (defaults to small)
  Git URL:    ssh://52fde7e844edea1d1a000007.rhcloud.com/~/git/php1s.git/
  SSH:        52fde7e844edea1d1a000007.rhcloud.com
  Deployment: auto (on git push)
  haproxy-1.4 (Web Load Balancer)
  -------------------------------
    Gears: Located with php-5.3
  php-5.3 (PHP 5.3)
  -----------------
    Scaling: x1 (minimum: 1, maximum: available) on small gears

Expected results:
Should scale up app after control haproxy multiplier with oo-admin-ctl-app successfully.

Additional info:

Comment 1 Clayton Coleman 2014-02-14 22:01:38 UTC
You need to be changing the multiplier in the mongo version of the cartridge - the value on the node has no effect unless you run oo-admin-ctl-cartridge.

Found a few problems with multipliers in the code.

Comment 2 Clayton Coleman 2014-02-14 22:10:59 UTC
Fixed https://github.com/openshift/origin-server/pull/4772

Comment 3 openshift-github-bot 2014-02-14 23:30:49 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/d0769158cb9c87d14a9c6f4b9d69d546ce5cc87e
Bug 1065318 - Multiplier overrides lost during deserialization

Comment 4 chunchen 2014-02-17 05:18:37 UTC
Checked on devenv_4382, it's reproduced.

Comment 5 chunchen 2014-02-17 08:20:04 UTC
Please refer the latest steps to reproduce the issue:

1. Create a scalable application
rhc create-app php1s php-5.3 -s

2. On broker, control the haproxy multiplier with oo-admin-ctl-app, eg: set multiplier to 2
oo-admin-ctl-app -c set-multiplier -l jhou -a php1s --cartridge haproxy-1.4 --multiplier 2

3. Scale up the application 7 times from cli
$ rhc cartridg-scale php-5.3 -a php1s --min 7 --max -1

This operation will run until the application is at the minimum scale and may take several minutes.
Setting scale range for php-5.3 ... 
Unable to complete the requested operation due to: comparison of Fixnum with nil failed
Reference ID: 031545752f3abda7de1de8b0375b7265

Comment 6 Clayton Coleman 2014-02-17 20:00:19 UTC
Fixed in https://github.com/openshift/origin-server/pull/4786

Comment 7 openshift-github-bot 2014-02-17 22:36:27 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/37a25ad0fa4ccbc51420056c4080f31d821b8f7a
Bug 1065318 - Multiplier being reset

Comment 8 chunchen 2014-02-18 02:01:08 UTC
It's fixed, verified on devenv_4387, please refer to the following results:

1. Create a scalable application
rhc create-app php1s php-5.3 -s

2. On broker, control the haproxy multiplier with oo-admin-ctl-app, eg: set multiplier to 2
oo-admin-ctl-app -c set-multiplier -l chunchen -a php1s --cartridge haproxy-1.4 --multiplier 2

3. Scale up the application 7 times from cli
$ rhc cartridge-scale php-5.3 -a php1s --min 7 --max -1

This operation will run until the application is at the minimum scale and may take several minutes.
Setting scale range for php-5.3 ... done

php-5.3 (PHP 5.3)
-----------------
  Scaling: x7 (minimum: 7, maximum: available) on small gears

$ rhc app show php1s
php1s @ http://php1s-cdm.dev.rhcloud.com/ (uuid: 5302bbacd5bcd7fe3f000007)
--------------------------------------------------------------------------
  Domain:     cdm
  Created:    9:47 AM
  Gears:      7 (defaults to small)
  Git URL:    ssh://5302bbacd5bcd7fe3f000007.rhcloud.com/~/git/php1s.git/
  SSH:        5302bbacd5bcd7fe3f000007.rhcloud.com
  Deployment: auto (on git push)

  haproxy-1.4 (Web Load Balancer)
  -------------------------------
    Gears: Located with php-5.3

  php-5.3 (PHP 5.3)
  -----------------
    Scaling: x7 (minimum: 7, maximum: available) on small gears

Comment 9 chunchen 2014-02-18 02:23:45 UTC
Checked on devenv_stage_700, it also can work well, the results are as the same as Comment #8.


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