Hide Forgot
Description of problem: Creating a snapshot of the application quickstart jbpmmigration setup as shown in readme (https://github.com/eschabell/openshift-jbpmmigration) works, but using listed restore achieves nothing. Version-Release number of selected component (if applicable): $ rhc --version rhc 1.18.2 How reproducible: Created a snapshot with 'rhc snapshot save jbpmmigration', this resulted in jbpmmigration.tar.gz file. Removed app, recreated empth jbossas-7 app with same name of jbpmmigration. Used 'rhc snapshot restore jbpmmigration --filepath jbpmmigration.tar.gz, takes instance offline, applies snapshot it says, and never bring it back up. Manual 'rhc app start jbpmmigration' brings up empty jbpmmigration, no war deployed or in the project. 'git pull' shows no changes to jbpmmigration instance code. Steps to Reproduce: 1. see above. 2. 3. Actual results: No snapshot applied. Expected results: Fully restored jbpmmigration app and 'git pull' pulling in changes to vanilla jbossas-7 project. Additional info:
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
Fixed in https://github.com/openshift/rhc/pull/530
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.