Bug 1216220
Summary: | oo-snapshot is not working | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Ricardo Martinelli de Oliveira <rmartine> |
Component: | Containers | Assignee: | Timothy Williams <tiwillia> |
Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | high | ||
Version: | 2.2.0 | CC: | adellape, anli, bleanhar, jialiu, jokerman, libra-onpremise-devel, mmccomas, pruan, tiwillia |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | rubygem-openshift-origin-node-1.36.1.1-1 | Doc Type: | Bug Fix |
Doc Text: |
The oo-snapshot command, which is a wrapper for '/usr/bin/gear snapshot', reports an unhelpful error when used outside of a gear environment. This bug fix updates /usr/bin/gear to report an error stating it should only be run inside of a gear when necessary environment variables are not defined. As a result, oo-snapshot reports the same error when run outside of a gear.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2015-07-21 19:12:24 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
Ricardo Martinelli de Oliveira
2015-04-28 19:34:16 UTC
Looks like it's a problem with /usr/bin/gear. oo-snapshot works when run inside a gear. The reason it fails outside of a gear is that the environment variables that '/usr/bin/gear' uses are not set: @container = OpenShift::Runtime::ApplicationContainer.new(ENV['OPENSHIFT_APP_UUID'], ENV['OPENSHIFT_GEAR_UUID'], Etc.getpwuid.uid, ENV['OPENSHIFT_APP_NAME'], ENV['OPENSHIFT_GEAR_NAME'], ENV['OPENSHIFT_NAMESPACE']) The error seen occurs any time /usr/bin/gear is run outside of a gear: # gear invalid command. Use --help for more information /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.35.4.2/lib/openshift-origin-node/model/application_container.rb:113:in `getpwnam': can't convert nil into String (TypeError) I think the bigger problem here is that we don't document the use of oo-snapshot, which is just a wrapper for '/usr/bin/gear snapshot'. I could see adding some logic in /usr/bin/gear to give a better error when it is run outside of a gear though. If we want to take this path: https://github.com/openshift/origin-server/pull/6133 Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/5054607c088762892498cbce7f7dd1f73dc950df BZ1216220 - oo-snapshot fails when run outside of a gear Bug 1216220 Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1216220 oo-snapshot and gear fail when run outside of a gear. Instead, these will fail gracefully with an error stating that they should not be run outside of a gear. There isn't package rubygem-openshift-origin-node-1.36.1.1-1 in puddle-2-2-2015-05-04 . We need to rebuild a puddle. thanks oo-snapshot provide clear message on node now. I will run extend testing (app snapshot save/restore ) once 1218872 is fixed. [root@node1 ~]# oo-snapshot This command should only be run inside of a gear. The environment variables 'OPENSHIFT_APP_UUID' and 'OPENSHIFT_GEAR_UUID' are not set. invalid command. Use --help for more information On puddle-2-2-2015-05-06. snapshot save/restore works. so move bug to verified. [anli@broker ~]$ rhc snapshot save sphp Pulling down a snapshot of application 'sphp' to sphp.tar.gz ... done [anli@broker ~]$ rhc snapshot restore sphp Restoring from snapshot sphp.tar.gz to application 'sphp' ... done 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-1463.html |