Bug 964002 - Hot deploy mechanics not applied to scaled gears
Summary: Hot deploy mechanics not applied to scaled gears
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: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-17 02:14 UTC by Dan Mace
Modified: 2015-05-14 23:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-11 04:04:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dan Mace 2013-05-17 02:14:56 UTC
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 20:35:09 UTC
Resolved by https://github.com/openshift/origin-server/pull/2601

Comment 2 openshift-github-bot 2013-05-22 23:05:36 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/28923ac4cc725989b3b9a940e8d2a87147149cb6
Bug 964002: Support hot deployment in scalable apps

Comment 3 joycezhang 2013-05-23 06:01:35 UTC
Verified this bug on devenv_3262 as below:


Steps:
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.rhcloud.com
519dac7f65d9c95af8000010         started jbossas-7 haproxy-1.4 small 519dac7f65d9c95af8000010.rhcloud.com
11765d3ec36c11e2af2c12313b0859da started jbossas-7 haproxy-1.4 small 11765d3ec36c11e2af2c12313b0859da.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.