Bug 981929 - Restore Snapshot does not work for wordpress
Summary: Restore Snapshot does not work for wordpress
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 1.x
Hardware: All
OS: All
medium
low
Target Milestone: ---
: ---
Assignee: Vojtech Vitek
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-07 04:35 UTC by Ganesh Bhat
Modified: 2015-03-04 23:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-19 14:22:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ganesh Bhat 2013-07-07 04:35:13 UTC
Description of problem:I am unable to restore the snapshot for wordpress with the same app name and a different app name for the following errors:

rhc snapshot restore -a wp1 -f /home/ganesh/wp.tar.gz Restoring from snapshot /home/ganesh/wp.tar.gz... The authenticity of host 'wp1-brandme.rhcloud.com (23.20.226.65)' can't be established. RSA key fingerprint is --------------------------------------------------------------- Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'wp1-brandme.rhcloud.com ----------------' (RSA) to the list of known hosts. Removing old git repo: ~/git/wp1.git/ Removing old data dir: ~/app-root/data/* Restoring ~/git/51d59aaa500446e638000138.git and ~/app-root/data MySQL already running

Could not find mysql database. Please run: rhc app cartridge add -a wp1 -c mysql-5.1 then make a sample commit (add whitespace somewhere) and re-push

/var/lib/openshift/51d59aaa500446e638000138//.env/CARTRIDGE_VERSION_2: line 1: 2: command not found /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.10.7/lib/openshift-origin-node/model/v2_cart_model.rb:1135:in do_action_hook': Failed to execute action hook 'deploy' for 51d59aaa500446e638000138 application wp1 (OpenShift::Utils::ShellExecutionException) from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.10.7/lib/openshift-origin-node/model/v2_cart_model.rb:1103:indo_control_with_directory' from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.10.7/lib/openshift-origin-node/model/v2_cart_model.rb:925:in do_control' from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.10.7/lib/openshift-origin-node/model/application_container.rb:625:indeploy' from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.10.7/lib/openshift-origin-node/model/application_container.rb:502:in post_receive' from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.10.7/lib/openshift-origin-node/model/application_container.rb:890:inrestore' from /usr/bin/gear:280:in block (2 levels) in <main>' from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:incall' from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in call' from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:155:inrun' from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:385:in run_active_command' from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:62:inrun!' from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/delegates.rb:11:in run!' from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/import.rb:10:inblock in ' Error in trying to restore snapshot. You can try to restore manually by running: cat /home/ganesh/wp.tar.gz | ssh------------------------------------'restore INCLUDE_GIT'

The MySQL database is available but not sure why does it error out. I have create a Wordpress cartridge which has MySQL by default.

Please refer : https://www.openshift.com/forums/openshift/unable-to-access-my-wordpress-blog#comment-32097

Version-Release number of selected component (if applicable):


How reproducible: Always


Steps to Reproduce:
1. Extract the existing snapshot of wordpress
2. create a new wordpress application first with different name and try restoring
3. Then create another wordpress application with the same name as the one from which snapshot was taken and try restoring

Actual results: Erroring out as above.


Expected results:Snapshot should be restored


Additional info: Please refer : https://www.openshift.com/forums/openshift/unable-to-access-my-wordpress-blog#comment-32097

Comment 1 chunchen 2013-07-08 03:09:11 UTC
This issue is not reproduced on devenv_3456 as below steps:

1. Create a wordpress app named "wordpress"
rhc app create wordpress php-5 mysql-5 --from-code=https://github.com/openshift/wordpress-example
2. Save snapshot of this app
rhc snapshot save wordpress
3. Create another wordpress app named "wordpress1"
rhc app create wordpress1 php-5 mysql-5 --from-code=https://github.com/openshift/wordpress-example
4. Restore "wordpress1" app
rhc snapshot restore wordpress1 -f wordpress.tar.gz
Restoring from snapshot wordpress.tar.gz...
Removing old git repo: ~/git/wordpress1.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/wordpress1.git and ~/app-root/data
MySQL already running

RESULT:
Success

hello Ganesh Bhat , 
if my reproduced steps are different with yours, could you please give more detail steps? thanks!

Comment 2 Vojtech Vitek 2013-07-10 17:13:44 UTC
> Restoring from snapshot wordpress.tar.gz...
> Removing old git repo: ~/git/wordpress1.git/
> Removing old data dir: ~/app-root/data/*
> Restoring ~/git/51dd946d5973cad4ce00014c.git and ~/app-root/data
> MySQL already running
> 
> RESULT:
> Success

I couldn't reproduce this issue either. My steps to reproduce were almost identical to those in comment 1.

Ganesh, could you please provide more information how could we reproduce this?

Comment 3 Vojtech Vitek 2013-09-19 14:22:09 UTC
Closing as WORKSFORME.

@Ganesh Bhat, please feel free to reopen this bz if you have different steps to reproduce or if you're still facing the issue.


Note You need to log in before you can comment on or make changes to this bug.