Bug 964002 - Hot deploy mechanics not applied to scaled gears
Hot deploy mechanics not applied to scaled gears
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan Mace
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-05-16 22:14 EDT by Dan Mace
Modified: 2015-05-14 19:18 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-11 00:04:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dan Mace 2013-05-16 22:14:56 EDT
Description of problem:

The haproxy coordinates deployments of remote gears using remote executions of the `gear remotedeploy` command, which relies on the contents of the application bare Git repo to make decisions related to hot deploy.

The bare repo is not currently synced across gears in the application, and so hot deploy will always appear to be disabled on the scaled gears, and making their operation inconsistent with the head gear.

This could be corrected with an argument provided to any gear script command which use the bare repo (e.g. remotedeploy, prereceive, stop), allowing web proxy carts such as haproxy (which have access to the bare repo) to provide the flag and allowing the gear script to use the argument rather than the repo to make decisions.

For example, haproxy could be invoking:

    gear remotedeploy --hot-deploy=true

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

How reproducible:

Attempt a default build cycle via Git push to a scalable application which has been scaled up to a minimum of 2 gears.

Steps to Reproduce:
1. Create a scalable application (the type is irrelevent)
2. Scale the application up to 2 gears
3. Push a change to the application via the Git repo
Actual results:

The haproxy gear sync step will fail due to an error returned remotely executing `gear remotedeploy` on the scaled gear.

Expected results:

A successful sync of the build from the haproxy gear to the scaled gear.

Additional info:
Comment 1 Dan Mace 2013-05-22 16:35:09 EDT
Resolved by https://github.com/openshift/origin-server/pull/2601
Comment 2 openshift-github-bot 2013-05-22 19:05:36 EDT
Commit pushed to master at https://github.com/openshift/origin-server

Bug 964002: Support hot deployment in scalable apps
Comment 3 joycezhang 2013-05-23 02:01:35 EDT
Verified this bug on devenv_3262 as below:

1. Create a scalable app
2. Scale up this app and get gears as below:
rhc app show -a jbosapp --gears
ID                               State   Cartridges            Size  SSH URL
-------------------------------- ------- --------------------- ----- ---------------------------------------------------------------------------------------------
d77735c8c36a11e2b95512313b0859da started jbossas-7 haproxy-1.4 small d77735c8c36a11e2b95512313b0859da@jbosapp-dm3262test1.dev.rhcloud.com
519dac7f65d9c95af8000010         started jbossas-7 haproxy-1.4 small 519dac7f65d9c95af8000010@519dac7f65d9c95af8000010-dm3262test1.dev.rhcloud.com
11765d3ec36c11e2af2c12313b0859da started jbossas-7 haproxy-1.4 small 11765d3ec36c11e2af2c12313b0859da@11765d3ec36c11e2af2c12313b0859da-dm3262test1.dev.rhcloud.com
3. Add hot deloy marker and make some changes in local repo.
4. git push the changes

Actual results:
The app is not restarted and app changes take effect for each scaled-up gear.

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