Bug 1096789 - Idler doesn't unidle secondary gears in a scaled application
Summary: Idler doesn't unidle secondary gears in a scaled application
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1093776
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-12 12:35 UTC by Brenton Leanhardt
Modified: 2014-08-04 13:27 UTC (History)
9 users (show)

Fixed In Version: rubygem-openshift-origin-node-1.23.9.14-1.el6op, rubygem-openshift-origin-controller-1.23.10.7-1.el6op, openshift-origin-broker-1.16.1.10-1.el6op
Doc Type: Bug Fix
Doc Text:
When unidling scaled applications using the `oo-admin-ctl-gears idle` command or an HTTP request, the head gear was unidled, but secondary gears were left idle. This was because the unidle logic used a local gear start only affecting the head gear. This bug fix updates the logic to instead use a broker REST call to start the entire application when unidling, which affects all gears. As a result, head gears and secondary gears are all unidled as expected.
Clone Of: 1093776
Environment:
Last Closed: 2014-08-04 13:27:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0999 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.4 bug fix and enhancement update 2014-08-04 17:26:43 UTC

Description Brenton Leanhardt 2014-05-12 12:35:38 UTC
+++ This bug was initially created as a clone of Bug #1093776 +++

Description of problem:

When unidling scaled apps, secondary gears are left idle.

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


How reproducible:

Idle all gears in a scaled application using `oo-admin-ctl-gears idle`. Unidle the primary gear via HTTP request or via `oo-admin-ctl-gears unidle`.

Steps to Reproduce:
1. Create a scaled php-5.5 application
2. Add the mysql-5.4 cartridge to the application
3. Idle all gears in the application
4. Unidle the primary gear

Actual results:

The mysql cartridge in its own gear remains idle.

Expected results:

The mysql cartridge (and any other secondary cartridges) should also be started during unidle.

Additional info:

This occurs because the unidle logic is implemented a gear-local ApplicationContainer#start_gear in openshift-origin-node. The code could be changed to invoke a broker start event which would start up the entire application rather than just the primary gear.

--- Additional comment from Dan Mace on 2014-05-05 14:44:51 EDT ---

https://github.com/openshift/origin-server/pull/5375

--- Additional comment from Yan Du on 2014-05-06 04:17:42 EDT ---

Test on devenv_4760, issue have been fixed

After unidle the primary gear via HTTP request or via `oo-admin-ctl-gears unidle`, the db gear's state is started.

move bug to verified.

Comment 1 Brenton Leanhardt 2014-07-18 15:58:55 UTC
Upstream commit:

commit 8bee9dbe15cf839b929bc19e9d6eb034f0fb0b05
Author: Dan Mace <ironcladlou>
Date:   Fri May 2 10:51:51 2014 -0400

    Support unidling scalable apps
    
    Use a broker REST call to start the entire app up during unidle
    rather than a local gear start.
    
    Adjust the 'scale' auth scope to include explicit state changes.
    This allows the node to start the app via the broker API, and is
    consistent with the previous scope in that it already includes
    scaling (which itself involves an implicit state change).
    
    Resolve bug: https://bugzilla.redhat.com/show_bug.cgi?id=1093776

Comment 4 Gaoyun Pei 2014-07-21 06:50:39 UTC
Verify this bug on puddle 2.1.z/2014-07-18.2.

Create a scalable php app and embed mysql to it. Idle the two gears using "oo-admin-ctl-gears idlegear".

[root@dhcp-129-188 workspace]# rhc app show app1 --gears
ID                       State Cartridges          Size   SSH URL
------------------------ ----- ------------------- ------ --------------------------------------------------------------------------
53ccb33edb26c87509000015 idle  haproxy-1.4 php-5.4 medium 53ccb33edb26c87509000015.com.cn
53ccb3cadb26c87509000034 idle  mysql-5.5           medium 53ccb3cadb26c87509000034.com.cn

Then unidle the primary gear via HTTP request. Check the state of the gears again.
[root@dhcp-129-188 workspace]# rhc app show app1 --gears
ID                       State   Cartridges          Size   SSH URL
------------------------ ------- ------------------- ------ --------------------------------------------------------------------------
53ccb33edb26c87509000015 started haproxy-1.4 php-5.4 medium 53ccb33edb26c87509000015.com.cn
53ccb3cadb26c87509000034 started mysql-5.5           medium 53ccb3cadb26c87509000034.com.cn

DB gear's state is started, so move this bug to VERIFIED.

Comment 6 errata-xmlrpc 2014-08-04 13:27:03 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.

http://rhn.redhat.com/errata/RHBA-2014-0999.html


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