Bug 1016917
Summary: | System Ruby segfaults, git push and ctl_app are both impossible | |||
---|---|---|---|---|
Product: | OpenShift Online | Reporter: | steven.merrill | |
Component: | Containers | Assignee: | Hiro Asari <hasari> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | |
Severity: | urgent | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 1.x | CC: | agrimm, bmeng, jkeck, xtian | |
Target Milestone: | --- | Keywords: | SupportQuestion | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1026970 (view as bug list) | Environment: | ||
Last Closed: | 2013-10-17 13:34:06 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: | ||
Embargoed: |
Description
steven.merrill
2013-10-08 22:45:15 UTC
This problem is definitely related to the gems installed in the gear's .gem directory. Ideally, commands like ctl_app and the postreceive hook should be unsetting GEM_HOME, so that this interference does not happen. I am able to take that .gem directory and reproduce the issue outside of the gear, so I should be able to file a bug against the json gem for that after I debug a little. I'll talk to engineering about what the best workaround is here. I could change the commit hook to unset GEM_HOME. for other actions, the user can ssh in, unset GEM_HOME, and then run ctl_app. (They would then need to reset GEM_HOME elsewhere, such as in a pre_start script, I think.) When I first looked at this, I failed to notice that this app was not set up using the ruby cartridge, and thus was defaulting to ruby-1.8 executables. So what happened here is that the user ran "gem install", and the json 1.8.0 gem was downloaded and compiled against ruby-1.8. So this is the reason for the segfault, rather than some bug in json or our ruby-1.9 interpreter. I've talked to Clayton, and he agrees that we should be ignoring the gear's GEM_HOME for gear/ctl_app operations. For now, I have added "unset GEM_HOME" in both the git pre-receive and post-receive hooks for this gear. Please try this and see if it allows you to do git pushes. Then we'll deal with any remaining issues. Reproducer for this: rhc app create bz1016917 --from-code https://github.com/a13m/bz1016917 OpenShift Team, Thanks for the sleuthing on this. This is indeed primarily a PHP app, but we're taking advantage of the fact that Ruby is available to do a phing build but also install some gems so that we can compile CSS with Compass. I may see if we can make sure that bundler installs to a local directory so that it shouldn't change the json gem that the gear script needs. A temporary fix is to require 'json' at the correct time. This is "fixed" on the master branch, so this issue does not happen on devenv. The stage branch PR is https://github.com/openshift/origin-server/pull/3863 |