Bug 1052276 - [new relic] Ruby cart restart should not fail attempting to touch $OPENSHIFT_REPO_DIR/tmp/restart.txt
Summary: [new relic] Ruby cart restart should not fail attempting to touch $OPENSHIFT_...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1057447
TreeView+ depends on / blocked
 
Reported: 2014-01-13 14:48 UTC by Jessica Forrester
Modified: 2014-03-04 07:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:55:31 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jessica Forrester 2014-01-13 14:48:29 UTC
Description of problem:
If the end user deletes the tmp dir under $OPENSHIFT_REPO_DIR/tmp then an application restart will fail because the command below fails:
touch $OPENSHIFT_REPO_DIR/tmp/restart.txt

Should check the code in post-deploy as well since it also attempts to touch this file.

We shouldn't assume that directory is still there since it is underneath their repo dir.

How reproducible:
Occurs in PROD when  and tries to restart their app.  Recreating the tmp dir allows app to be restarted again.

Steps to Reproduce:
1. Create a ruby app
2. ssh in and delete app-root/repo/tmp
3. Restart the app

Actual results:
500 error with these messages (as reported by site in new relic):
Error: Failed to execute: 'control restart' for /var/lib/openshift/<id>/rubyrestarting Ruby carttouch: cannot touch `/var/lib/openshift/<id>/app-root/runtime/repo//tmp/restart.txt': No such file or directory -- Unable to complete the requested operation due to: Failed to correctly execute all parallel operations - ["RestartCompOp"]

Expected results:
The application should restart.

Comment 2 Dan McPherson 2014-01-13 23:07:00 UTC
If tmp isn't there we should fall back to the standard apache restart.

Comment 3 openshift-github-bot 2014-01-14 10:51:15 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/8538a1b2dac7ae49bafe671ba89b1be4f13e5131
Bug 1052276 - Check if tmp/ directory exists before ruby restart

Comment 4 Michal Fojtik 2014-01-14 12:37:48 UTC
Fyi, we are doing the full apache restart anyway. I think the reason why is to pick up environment variables changes (performance/passenv). In that case I think it does not even make a sense to touch the restart.txt.

Comment 5 Yan Du 2014-01-15 08:04:37 UTC
test ruby-1.8 and ruby-1.9 on devenv_4224, after ssh into app and delete app-root/repo/tmp, app can restart normally. 

[root@Daphne test]# rhc app restart ruby19
RESULT:
ruby19 restarted

Move to verified.


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