Bug 1057447 - Rails app can not be restarted when created from code with missing dependency
Summary: Rails app can not be restarted when created from code with missing dependency
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Templates
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1052276
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-24 06:51 UTC by Ma xiaoqiang
Modified: 2017-03-08 17:36 UTC (History)
4 users (show)

Fixed In Version: openshift-origin-cartridge-ruby-1.17.5-1.el6op
Doc Type: Bug Fix
Doc Text:
During a restart, the Ruby cartridge attempted to modify a file in the {OPENSHIFT_REPO_DIR}/tmp directory, which in some cases did not exist. Therefore, the Ruby cartridge would fail to restart on gears that were missing this directory. This bug fix adds a test to ensure ${OPENSHIFT_REPO_DIR}/tmp exists before creating or modifying any files in that directory. The following command must be run after applying this fix: # oo-admin-upgrade upgrade-node --version=2.0.3 See the Solution section in the errata advisory for full details.
Clone Of:
Environment:
Last Closed: 2014-02-25 15:43:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0209 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.0.3 bugfix and enhancement update 2014-02-25 20:40:32 UTC

Description Ma xiaoqiang 2014-01-24 06:51:22 UTC
Description of problem:
When the package "nodejs.x86_64" is missing on the node, create a rails app with "--from-code" option, the app will be created successfully, but it can not be restart.

Version-Release number of selected component (if applicable):
puddle [2.0.3/2014-01-22.1]

How reproducible:
always

Steps to Reproduce:
1.setup the env, make sure the "nodejs.x86_64" is not installed on node
2.create a rails app with "--from-code" option
#rhc app create testapp ruby-1.9 mysql --from-code=https://github.com/openshift/rails-example
3.restart the app 
#rhc app restart testapp


Actual results:
No error is given out when creating app, but it can not be restarted
Output:
A gear restart did not complete on 1 gear. Please try again and contact support if the issue persists.


Expected results:
The app should be restarted successfully.


Additional info:
The problem doesn't exist on devenv, there are no problem of dependency on devenv.
For ose,if resolving all problem of dependency on node, then I create rails app with "--from-code", the app can be restarted.
When I create rails app as follow step:
   #rhc app create -a railsapp -t ruby-1.9
   #rhc cartridge add -a railsapp -c mysql-5.1
   #cd railsapp
   #git remote add upstream -m master git://github.com/openshift/rails-example.git
   #git pull -s recursive -X theirs upstream master
   #git push
When deploying the app, some error message on missing dependency will be given out. After resolving dependency problem and depoly the app successfully, it can be restarted successfully.

Comment 2 Brenton Leanhardt 2014-01-30 18:20:37 UTC
I'm 99% certain this doesn't have anything to do with the nodejs dependency.  I see the same behavior regardless of whether or not I have it installed.

Checking the logs I see that it is unable to touch tmp/restart.txt in the gear.  Upstream addressed this with the following commit:

commit 8538a1b2dac7ae49bafe671ba89b1be4f13e5131
Author: Michal Fojtik <mfojtik>
Date:   Tue Jan 14 10:49:41 2014 +0100

    Bug 1052276 - Check if tmp/ directory exists before ruby restart

Comment 4 Brenton Leanhardt 2014-01-30 18:27:04 UTC
Once this is built you test this as follows:

1) Reproduce the broken environment

On the node(s)
2) Update to the new ruby cartridge package
3) service ruby193-mcollective restart

On the rhc client
4) create a new rails-example (this one should work)

On the broker
5) rm /tmp/oo-upgrade
6) oo-admin-upgrade upgrade-node --version 2.0.3

After the oo-admin-upgrade step the broken restarts should now work as expected.

Comment 7 Ma xiaoqiang 2014-02-07 08:40:41 UTC
check it on puddle [2.0.3/2014-02-06.1]
1.setup the env, make sure the "nodejs.x86_64" is not installed on node
2.create a rails app with "--from-code" option
#rhc app create testapp ruby-1.9 mysql --from-code=https://github.com/openshift/rails-example
3.restart the app 
#rhc app restart testapp
RESULT:
testapp restarted

Comment 9 errata-xmlrpc 2014-02-25 15:43:56 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-0209.html


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