Bug 1202515
| Summary: | GEM_HOME can break "gear" commands | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Brenton Leanhardt <bleanhar> |
| Component: | Containers | Assignee: | Brenton Leanhardt <bleanhar> |
| Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | high | ||
| Version: | 2.2.0 | CC: | adellape, agoldste, agrimm, anli, bmeng, jkaur, jokerman, libra-bugs, libra-onpremise-devel, mmccomas, pruan, tiwillia |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | rubygem-openshift-origin-node-1.35.4.1-1.el6op | Doc Type: | Bug Fix |
| Doc Text: |
In certain situations, such as pre- and post-receive hooks, the presence of gems in a gear's $GEM_HOME environment variable previously could break /usr/bin/gear subcommands. This was due to the user-supplied gems in $GEM_HOME overriding the OpenShift-provided ones, potentially causing exceptions. This bug fix updates the node logic to explicitly set GEM_HOME to '' for the /usr/bin/gear command and Ruby SDK to protect them from running with user-supplied gems. As a result, exceptions are no longer raised during a "git push" in this scenario.
|
Story Points: | --- |
| Clone Of: | 1187829 | Environment: | |
| Last Closed: | 2015-04-06 17:06:51 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: | |||
| Bug Depends On: | 1187829 | ||
| Bug Blocks: | |||
|
Description
Brenton Leanhardt
2015-03-16 19:10:32 UTC
Verified and pass on 1. The error can be reproduced without the fix., and no such issue on puddle-2-2-2015-03-16 Recreate step as below: 1. echo 'echo $GEM_HOME' > .openshift/action_hooks echo 'gem install activemodel' >> .openshift/action_hooks 2.git push the change 3. the same error was catched in output remote: Installing RDoc documentation for thread_safe-0.3.5... remote: Installing RDoc documentation for tzinfo-1.2.2... remote: Installing RDoc documentation for minitest-5.5.1... remote: Installing RDoc documentation for activesupport-4.2.0... remote: Installing RDoc documentation for builder-3.2.2... remote: Installing RDoc documentation for activemodel-4.2.0... remote: Building Ruby cartridge remote: Preparing build for deployment remote: Deployment id is 1ddace62 remote: Activating deployment remote: Compilation of assets is disabled or assets not detected. remote: Starting Ruby cartridge remote: /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-common-1.29.1.1/lib/openshift-origin-common/models/model.rb:13:in `<class:Model>': uninitialized constant ActiveModel::Observing (NameError) remote: from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-common-1.29.1.1/lib/openshift-origin-common/models/model.rb:6:in `<module:OpenShift>' 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. https://rhn.redhat.com/errata/RHBA-2015-0779.html |