Bug 1112152 - Got 503 error after adding one gem file for scalable ruby-1.8 app
Summary: Got 503 error after adding one gem file for scalable ruby-1.8 app
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 2.1.0
Hardware: All
OS: All
high
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1110287
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-23 08:53 UTC by Ma xiaoqiang
Modified: 2016-07-04 00:44 UTC (History)
10 users (show)

Fixed In Version: openshift-origin-cartridge-ruby-1.23.3.6-1.el6op
Doc Type: Bug Fix
Doc Text:
Default ruby-1.8 applications contained an unnecessary library inclusion, which could result in 503 errors when the library was not available in some environments. This bug fix updates the Ruby cartridge to remove the library reference, and these errors no longer occur on new gears that are created after applying this fix. A workaround for existing gears is to manually remove the library.
Clone Of: 1110287
Environment:
Last Closed: 2014-08-26 13:52:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1095 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.5 bug fix and enhancement update 2014-08-26 17:51:34 UTC

Description Ma xiaoqiang 2014-06-23 08:53:49 UTC
This issue exist on puddle[2.1.z/2014-06-20.2]

+++ This bug was initially created as a clone of Bug #1110287 +++

Description of problem:
Given a ruby-1.8 cartridge app, install gem package by Gemfile, after git push,the app will cannot be accessible.

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

How reproducible:
always

Steps to Reproduce:
1. Create one ruby-1.8 app
2. Add 'Gemfile' in the repo with following content:
   
   source 'https://rubygems.org'

   gem 'sinatra'

3. bundle install
4. git push

Actual results:
after step 4: 
for non-scale ruby-1.8, when accessing show "Ruby (Rack) application could not be started"
for scale ruby-1.8, app will cannot be accessible: 503 error

Expected results:
app can work well

Additional info:
ruby-1.9 can work well.
and check the log:
rhc tail crb18s
==> app-root/logs/haproxy_ctld.log <==
I, [2014-06-17T08:07:48.764395 #31496]  INFO -- : Starting haproxy_ctld
I, [2014-06-17T08:50:13.606026 #13074]  INFO -- : Starting haproxy_ctld

==> app-root/logs/haproxy.log <==
[ALERT] 167/081210 (31928) : proxy 'express' has no server available!
[WARNING] 167/085012 (31928) : Server express/local-gear is DOWN for maintenance.
[WARNING] 167/085013 (13053) : config : log format ignored for proxy 'stats' since it has no log address.
[WARNING] 167/085013 (13053) : config : log format ignored for proxy 'express' since it has no log address.
[WARNING] 167/085013 (13053) : Server express/local-gear is DOWN, reason: Layer7 wrong status, code: 500, info: "Internal Server Error", check duration: 354ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[ALERT] 167/085013 (13053) : proxy 'express' has no server available!
[WARNING] 167/085014 (13053) : Server express/local-gear is DOWN for maintenance.
[WARNING] 167/085015 (13053) : Server express/local-gear is UP (leaving maintenance).
[WARNING] 167/085015 (13053) : Server express/local-gear is DOWN, reason: Layer7 wrong status, code: 500, info: "Internal Server Error", check duration: 191ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[ALERT] 167/085015 (13053) : proxy 'express' has no server available!

==> app-root/logs/ruby.log <==
	from config.ru:1
- - - [17/Jun/2014:09:08:36 -0400] "GET / HTTP/1.0" 500 5066 "-" "-"
*** Exception LoadError in Class (no such file to load -- thread-dump) (process 13200, thread #<Thread:0x7f44745ed368>):
	from config.ru:2:in `require'
	from config.ru:2
	from /var/lib/openshift/53a02f76b918773b65000ddb/app-root/runtime/repo/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
	from /var/lib/openshift/53a02f76b918773b65000ddb/app-root/runtime/repo/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
	from config.ru:1:in `new'
	from config.ru:1

--- Additional comment from Ben Parees on 2014-06-19 13:01:02 EDT ---

https://github.com/openshift/origin-server/pull/5527

--- Additional comment from openshift-github-bot on 2014-06-19 15:40:09 EDT ---

Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/f4c2f7d6fe7363ba30f4ca49361112fea49445ed
Bug 1110287: Removing thread-dump dependency from ruby-1.8 cunfig.ru template

--- Additional comment from Brenton Leanhardt on 2014-06-19 22:15:37 EDT ---

Did this only happen when rubygem-thread-dump wasn't installed on a Node or was there some other problem?  I'm curious if this is relevant for OSE.

--- Additional comment from zhaozhanqi on 2014-06-20 02:32:32 EDT ---

Verified this bug on devenv-stage_888, both non-scale and scale ruby-1.8 app work well.

--- Additional comment from Ben Parees on 2014-06-20 08:53:09 EDT ---

Jakub worked the bug, bouncing the needinfo to him.

Comment 1 Jakub Hadvig 2014-07-10 12:37:35 UTC
Couldn't reproduce this one.

Putting on qe

Comment 2 Jakub Hadvig 2014-07-10 12:40:09 UTC
sorry I've didn't realized this is OSE.
Putting back to NEW

Comment 3 Brenton Leanhardt 2014-08-01 13:19:41 UTC
Upstream commit:

commit f4c2f7d6fe7363ba30f4ca49361112fea49445ed
Author: jhadvig <jhadvig>
Date:   Thu Jun 19 10:27:04 2014 +0200

    Bug 1110287: Removing thread-dump dependency from ruby-1.8 cunfig.ru template

Comment 6 Ma xiaoqiang 2014-08-04 06:48:52 UTC
Check on puddle[2.1.5/2014-08-01.1]

1.create a non-scale ruby-1.8 app
#rhc app create rb18 ruby-1.8 
2. Add 'Gemfile' in the repo with following content:
   source 'https://rubygems.org'
   gem 'sinatra'
3. bundle install
4. git push
5. access the app
curl http://rb18-xiaom.ose21z.example.com/


Test scalable ruby-1.8 app according to the same steps
curl http://rb18s-xiaom.ose21z.example.com/

All the apps are accessable.

Comment 8 errata-xmlrpc 2014-08-26 13:52:36 UTC
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-1095.html


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