Bug 864519 - Gear of scalable apps with mysql-5.1/mongodb-2.2 is down after git push
Gear of scalable apps with mysql-5.1/mongodb-2.2 is down after git push
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Mrunal Patel
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-09 09:44 EDT by jizhao
Modified: 2015-05-14 19:00 EDT (History)
3 users (show)

See Also:
Fixed In Version: devenv_2318+
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:50:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jizhao 2012-10-09 09:44:14 EDT
Description of problem:
Create a scalable jbossas-7/jbosseap-6.0 app and add mysql-5.1/mongodb-2.2 to it. Do some change to the git repo and git push. Check the haproxy-status page and only the "local-gear" is active. Scale up the app using rest api and all the gears will be down.


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


How reproducible:
Always


Steps to Reproduce:
1.Create a scalable jbossas-7/jbosseap-6.0 app and add mysql-5.1/mongodb-2.2 to it
$ rhc app create -a <appname> -t jbossas-7 -s
$ rhc app cartridge add -a <appname> -c mysql-5.1 -d
2.Do some changes to the git repo and git push. For example, print out OPENSHIFT_GEAR_DNS:
<------------------index.jsp------------------->
<%@ page contentType="text/html" language="java" import="java.sql.*" %>
<%@ page import="javax.naming.*" %>
<%@ page import="java.util.*" %>
<%
Map map = System.getenv();
out.print("App DNS: " + map.get("OPENSHIFT_GEAR_DNS") + "<br />");
%>
<----------------------------------------->
3.Check the web page and haproxy-status page.
4.Scale up the app
$ curl -k -H "Accept: application/xml" --user "jizhao+1@redhat.com:redhat" https://ec2-23-20-10-163.compute-1.amazonaws.com/broker/rest/domains/jizhao10/applications/app1/events/ -d event=scale-up -X POST
  

Actual results:
3.In the web page, we can only get "<appname>-<domain_name>.dev.rhcloud.com", which is the gear dns of "local-gear". In haproxy-status page, only the "local-gear" is active. The other one is down.
4.After scaling up, all gears are down.


Expected results:
3.There should be 2 gears running.
4.The app should be scaled up successfully. All gears should be available.

Additional info:
Gears work fine if not embedded with mysql/mongodb
Comment 1 Rony Gong 2012-10-11 04:21:38 EDT
This error happened for all scalable app type, but works well for just embed postgresql.
Comment 2 Mrunal Patel 2012-10-11 15:12:21 EDT
Fixed with https://github.com/openshift/origin-server/pull/655
Comment 3 Rony Gong 2012-10-11 22:57:04 EDT
Verified on devenv_2317
1.Create a scalable jbossas-7/jbosseap-6.0 app and add mysql-5.1/mongodb-2.2 to it
$ rhc app create -a <appname> -t jbossas-7 -s
$ rhc app cartridge add -a <appname> -c mysql-5.1 -d
2.Do some changes to the git repo and git push. For example, print out OPENSHIFT_GEAR_DNS:
<------------------index.jsp------------------->
<%@ page contentType="text/html" language="java" import="java.sql.*" %>
<%@ page import="javax.naming.*" %>
<%@ page import="java.util.*" %>
<%
Map map = System.getenv();
out.print("App DNS: " + map.get("OPENSHIFT_GEAR_DNS") + "<br />");
%>
<----------------------------------------->
3.Check the web page and haproxy-status page.
4.Scale up the app
$ curl -k -H "Accept: application/xml" --user "jizhao+1@redhat.com:redhat" https://ec2-23-20-10-163.compute-1.amazonaws.com/broker/rest/domains/jizhao10/applications/app1/events/ -d event=scale-up -X POST

Result:
The app scaled up successfully. All gears are available.

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