+++ 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.
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
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.
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