Bug 1022868

Summary: 503 error returns when access the app after deploying from stop status for jbossews-1.0/2.0 scalable app
Product: OpenShift Online Reporter: Lei Zhang <lzhang>
Component: ContainersAssignee: Andy Goldstein <agoldste>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: agoldste, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:26:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Lei Zhang 2013-10-24 08:07:51 UTC
Description of problem:
Given jbossews-1.0/2.0 scalable app created(e.g.,myjbossews10s), stop the app and then change something in local repo and git push. Found 503 error returns when accessing via curl after deploying, even though the state of app is started.

[rayzhang@ray myjbossews10s]$ rhc cartridge status -a myjbossews10s -c jbossews-1.0
RESULT:
The jbossews cartridge is running.

[rayzhang@ray myjbossews10s]$ rhc app show --state -a myjbossews10s 
Cartridge jbossews-1.0, haproxy-1.4 is started

[rayzhang@ray myjbossews10s]$ curl -I http://myjbossews10s-chunchen.dev.rhcloud.com/
HTTP/1.0 503 Service Unavailable
Date: Thu, 24 Oct 2013 03:47:03 GMT
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from file01.intranet.prod.int.rdu2.redhat.com
X-Cache-Lookup: MISS from file01.intranet.prod.int.rdu2.redhat.com:8080
Via: 1.0 file01.intranet.prod.int.rdu2.redhat.com (squid/3.1.10)
Connection: keep-alive

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

How reproducible:
always

Steps to Reproduce:
1.Create one jbossews scalable app
#rhc app create myjbossews10s jbossews-1.0 -s
2.Stop the app and change something in local repo and git push
#rhc app stop myjbossews10s
#sed -i 's/Welcome/Hi/g' src/main/webapp/index.html 
#git add -A &&git commit -amp&&git push
3.Check the status of app and access the app via curl
#rhc app show --state -a myjbossews10s
#curl -I http://myjbossews10s-chunchen.dev.rhcloud.com/


Actual results:
503 error returns when accessing via curl after deploying from stop for jbossews-1.0/2.0 scalable app

Expected results:
The home page of app can be accessed since the status is started after deploying from stop status 

Additional info:

Comment 1 Andy Goldstein 2013-10-24 16:10:28 UTC
https://github.com/openshift/origin-server/pull/3980

Comment 2 openshift-github-bot 2013-10-24 17:33:08 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/6e09ffe4967d6f3acd431d0bfcc4ce0aba0012c9
Start web proxy cartridge in activate

Remove exclusion of starting the web proxy cartridge in activate
because it's possible the user has previously stopped their
application. If so, when activating, we need to start the web proxy
cartridge. If it's already started, it will be a no-op.

Bug 1022868

Comment 3 Lei Zhang 2013-10-25 02:24:56 UTC
Verified on devenv_3942, the home page can be accessed after deploying from stop status for jbossews scalable app.

[rayzhang@ray Work]$ curl -I http://myjbossews10s-chunchen.dev.rhcloud.com/
HTTP/1.0 200 OK
Date: Fri, 25 Oct 2013 02:23:04 GMT
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"5815-1382667660000"
Last-Modified: Fri, 25 Oct 2013 02:21:00 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 5815
Cache-Control: private
Set-Cookie: GEAR=local-5269cf93c6383977f500002d; path=/
Vary: Accept-Encoding,User-Agent
ProxyTime: D=5374
X-Cache: MISS from file01.intranet.prod.int.rdu2.redhat.com
X-Cache-Lookup: MISS from file01.intranet.prod.int.rdu2.redhat.com:8080
Via: 1.0 file01.intranet.prod.int.rdu2.redhat.com (squid/3.1.10)
Connection: keep-alive