| Summary: | rhc snapshot restore <app> --filepath <app.tar.gz> does not restore anything for all web cartridges on MacOS | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Eric D. Schabell <eschabel> |
| Component: | oc | Assignee: | Clayton Coleman <ccoleman> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 2.x | CC: | ffranz, jliggitt, wjiang, wsun |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Mac OS | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-01-30 00:53:26 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: | |
|
Description
Eric D. Schabell
2013-12-15 18:52:18 UTC
Could not reproduce this bug on STG(devenv-stage_614) with rhc-1.18.2 and the latest devenv(devenv_4137) with rhc-1.19.1. Step: 1)Create a quickstart jbpmmigration rhc app create -t jbossas-7 --from-code git://github.com/eschabell/openshift-jbpmmigration.git jbpmmigration 2)Snapshot save this quickstart app rhc snapshot-save jbpmmigration 3)Delete the quickstart app 4)Create a jbossas-7 app rhc app-create jbpmmigration jbossas-7 5)Restore the app with jbpmmigration.tar.gz rhc snapshot-restore jbpmmigration --filepath jbpmmigration.tar.gz Result: 5)The app could be restored successfully.And access the app's url: $url/bpmmigration_upload-0.5, "Welcome to the jBPM Migration in the Cloud!" is shown. Could reproduce this bug on MacOS,but could not reproduce this bug on Fedora19,Ubuntu and Windows. On MacOS: After restoring app with jbpmmigration.tar.gz,app is shown stopped. On Fedora19,Ubuntu and Windows: After restoring app with jbpmmigration.tar.gz,app is shown startted. (In reply to Wei Sun from comment #1) > Could not reproduce this bug on STG(devenv-stage_614) with rhc-1.18.2 and > the latest devenv(devenv_4137) with rhc-1.19.1. > > Step: > 1)Create a quickstart jbpmmigration > rhc app create -t jbossas-7 --from-code > git://github.com/eschabell/openshift-jbpmmigration.git jbpmmigration > 2)Snapshot save this quickstart app > rhc snapshot-save jbpmmigration > 3)Delete the quickstart app > 4)Create a jbossas-7 app > rhc app-create jbpmmigration jbossas-7 > 5)Restore the app with jbpmmigration.tar.gz > rhc snapshot-restore jbpmmigration --filepath jbpmmigration.tar.gz > > Result: > 5)The app could be restored successfully.And access the app's url: > $url/bpmmigration_upload-0.5, "Welcome to the jBPM Migration in the Cloud!" > is shown. Tried this bug for other web cartridges(php-5.3/ruby-1.8/ruby-1.9/perl-5.10/nodejs-0.6/nodejs-0.10/jbossews-1.0/jbossews-2.0/jbosseap-6.0/diy-0.1),after restoring app ,app is stopped. 1.Before restoring app: dhcp-65-87:test OpenShift$ rhc app-show eapt --state Cartridge jbosseap-6 is started 2.Restore app: dhcp-65-87:test OpenShift$ rhc snapshot-restore eapt -d DEBUG: Using config file /Users/OpenShift/.openshift/express.conf DEBUG: Git config 'git config --get rhc.app-id' returned '' DEBUG: Git config 'git config --get rhc.app-name' returned '' DEBUG: Git config 'git config --get rhc.domain-name' returned '' DEBUG: Authenticating with RHC::Auth::Token DEBUG: Connecting to https://ec2-54-234-61-89.compute-1.amazonaws.com/broker/rest/api DEBUG: Getting all domains DEBUG: Client supports API versions 1.1, 1.2, 1.3, 1.4, 1.5 DEBUG: Using token authentication DEBUG: Created new httpclient DEBUG: Request GET https://ec2-54-234-61-89.compute-1.amazonaws.com/broker/rest/api DEBUG: SSL Verification failed -- Using self signed cert DEBUG: code 200 1175 ms DEBUG: Server supports API versions 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6 DEBUG: Using API version 1.5 DEBUG: Client API version 1.5 is not current. Refetching API DEBUG: Using token authentication DEBUG: Request GET https://ec2-54-234-61-89.compute-1.amazonaws.com/broker/rest/api DEBUG: code 200 292 ms DEBUG: Using token authentication DEBUG: Request GET https://ec2-54-234-61-89.compute-1.amazonaws.com/broker/rest/domains DEBUG: code 200 313 ms DEBUG: Using token authentication DEBUG: Request GET https://ec2-54-234-61-89.compute-1.amazonaws.com/broker/rest/domains/wsundev4137/applications/eapt DEBUG: code 200 386 ms Restoring from snapshot eapt.tar.gz... DEBUG: cat 'eapt.tar.gz' | ssh 52aed73d646af03b410000c4.rhcloud.com 'restore' Removing old data dir: ~/app-root/data/* Restoring ~/app-root/data RESULT: Success 3.After restoring app: dhcp-65-87:test OpenShift$ rhc app-show eapt --state Cartridge jbosseap-6 is stopped On other platforms,snapshot-restore command is using "cat 'phpt.tar.gz' | ssh 52aedbaa2587c87cb8000001.rhcloud.com 'restore INCLUDE_GIT'" , and app will be restored successfully. But on MacOS, use 'rhc snapshot-restore $appname -d',find it is using "cat 'phpt.tar.gz' | ssh 52aedbaa2587c87cb8000001.rhcloud.com 'restore'". And after running 'rhc snapshot-restore $appname' on MacOS,my app is stopped,and I try to run 'cat 'phpt.tar.gz' | ssh 52aedbaa2587c87cb8000001.rhcloud.com 'restore INCLUDE_GIT'',it is started again. That means this utility method is not returning correctly on OS X: RHC::TarGz.contains(filename, './*/git') This is the command to detect if the backup has git files in it: tar --wildcards -tf 'php.tar.gz' './*/git' The --wildcards option isn't supported in the OOB tar distribution on OS X Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/10937c74f8c91df2e0b604573f79c360b7f27ffd Bug 1043291 - using ruby to snapshot restore on mac (tar --wildcards not supported) Tried on rhc-1.19.3 with devenv_4187, and can not reproduce this issue, so verified this issue. |