Bug 823853 - Can't restore the snapshot to the app in win7 and mac
Can't restore the snapshot to the app in win7 and mac
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Fabiano Franz
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-22 06:12 EDT by yquan
Modified: 2015-05-14 21:54 EDT (History)
2 users (show)

See Also:
Fixed In Version: rhc-0.93.16-1+
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-08 13:59:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The attachemnt is the file that locate: /var/lib/stickshift/410d3c3c463040e98067a5fc083c1173/php-5.3/conf.d/stickshift.conf (1.17 KB, text/plain)
2012-05-29 01:02 EDT, Rony Gong
no flags Details

  None (edit)
Description yquan 2012-05-22 06:12:32 EDT
Description of problem:
Can't restore the snapshot to the app in win7,and return the error message like below.

Password: c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/lib/vendor/pr/zlib.rb:102:in `raise_zlib_error': invalid literal/length code (Rhc::Vendor::Zlib::DataError)

	from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/lib/vendor/pr/zlib.rb:354:in `block in zstream_run'

	from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/lib/vendor/pr/zlib.rb:336:in `loop'

	from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/lib/vendor/pr/zlib.rb:336:in `zstream_run'

	from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/lib/vendor/pr/zlib.rb:995:in `gzfile_read_header'

	from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/lib/vendor/pr/zlib.rb:1229:in `initialize'

	from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/lib/helpers.rb:21:in `new'

	from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/lib/helpers.rb:21:in `contains'

	from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/lib/rhc-common.rb:812:in `snapshot_restore'

	from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/bin/rhc-app:384:in `save_or_restore_snapshot'

	from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rhc-0.93.3/bin/rhc-app:551:in `<top (required)>'

	from c:/Ruby193/bin/rhc-app:23:in `load'

	from c:/Ruby193/bin/rhc-app:23:in `<main>'


Version-Release number of selected component (if applicable):
devenv_1785
rhc-0.93.3
ruby-1.9.3

How reproducible:
always

Steps to Reproduce:
1.create an app
2.take a snapshot to this app
3.restore the snapshot
  
Actual results:
Will return error message like above.

Expected results:
It should restore the snapshot successfully to the app.

Additional info:
Comment 1 yquan 2012-05-23 01:08:31 EDT
This bug still exist in rhc-0.93.6, but the result is after I use command "rhc app snapshot restore",It will not return anything, and keep halt.
Comment 2 yquan 2012-05-23 05:31:01 EDT
I tested this bug in Mac os.
1.When restore the snapshot to an app have not added any cartridge,It will return the message like below:
Restoring from snapshot php0.tar.gz...

Stopping application...
Syntax error on line 2 of /var/lib/stickshift/983574aad38c487ebf615a51fbe766d7/php0/conf.d/stickshift.conf:
DocumentRoot must be a directory
httpd (no pid file) not running
Done
Removing old git repo: ~/git/php0.git/
Removing old data dir: ~/php0/data/*
Restoring ~/git/php0.git and ~/php0/data

gzip: 
stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
~ ~
fatal: not a tree object
tar: 
This does not look like a tar archive

tar: 
Exiting with failure status due to previous errors

~
Starting application...
Syntax error on line 2 of /var/lib/stickshift/983574aad38c487ebf615a51fbe766d7/php0/conf.d/stickshift.conf:
DocumentRoot must be a directory
Done
Terminating...



2.When restore the snapshot to an app with mysql,it will not return anything, and keep halt.
Comment 3 Clayton Coleman 2012-05-24 18:39:07 EDT
This may be fixed, but double check.
Comment 4 Fabiano Franz 2012-05-25 16:51:55 EDT
Fixed.
Comment 5 Rony Gong 2012-05-29 01:02:50 EDT
Created attachment 587313 [details]
The attachemnt is the file that locate: /var/lib/stickshift/410d3c3c463040e98067a5fc083c1173/php-5.3/conf.d/stickshift.conf

Tested again and found failed in mac platform,
(deven_1806, rhc.0.93.12)

OpenShiftmatoMacBook-Pro:~ root# rhc-snapshot -a gqphp -r gqphp.tar.gz    
Password: ******

Restoring from snapshot gqphp.tar.gz...

Stopping application...
Syntax error on line 2 of /var/lib/stickshift/410d3c3c463040e98067a5fc083c1173/gqphp/conf.d/stickshift.conf:
DocumentRoot must be a directory
httpd (no pid file) not running
Done
Removing old git repo: ~/git/gqphp.git/
Removing old data dir: ~/gqphp/app/data/*
Restoring ~/git/gqphp.git and ~/app/data

gzip: 
stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
~ ~
fatal: not a tree object
tar: 
This does not look like a tar archive

tar: 
Exiting with failure status due to previous errors

~
Starting application...
Syntax error on line 2 of /var/lib/stickshift/410d3c3c463040e98067a5fc083c1173/php-5.3/conf.d/stickshift.conf:
DocumentRoot must be a directory
Done
Terminating...
Comment 6 Rony Gong 2012-05-29 01:56:34 EDT
The test result in RHEL6 and win7 are passed.

Then I do some steps on mac like:
1.create 1 app -t php-5.3
2.embed mysql-5.1 and phpmyadmin-3.4
3.then I want to access the phpmyadmin page, but fail with:
The requested URL /phpmyadmin/ was not found on this server.
4.Then I access the app page, could access right.
Comment 7 Fabiano Franz 2012-05-30 14:27:31 EDT
Fixed on rhc-0.93.15-1+, tested on a Mac with a PHP app, MySQL and PHPMyAdmin.
Comment 8 yquan 2012-05-31 04:04:58 EDT
It still can't restore success.
I tested on mac.


testing step:
1.create an php app
2.snapshot save this app
3.restore this app


output:


OpenShiftmatoMacBook-Pro:~ root# rhc app snapshot restore -a php0
Password: **

Restoring from snapshot php0.tar.gz...

Stopping application...
Waiting for stop to finish
Done
Removing old git repo: ~/git/php0.git/
Removing old data dir: ~/php0/app/data/*
Restoring ~/git/php0.git and ~/app/data

gzip: 
stdin: unexpected end of file
/bin/tar: Child returned status 1
/bin/tar: Error is not recoverable: exiting now
~ ~
fatal: not a tree object
tar: 
This does not look like a tar archive

tar: 
Exiting with failure status due to previous errors

~
Starting application...
Syntax error on line 2 of /var/lib/stickshift/b9177844739448018174e356d6268dd4/php-5.3/conf.d/stickshift.conf:
DocumentRoot must be a directory
Done
Terminating...
Comment 9 Fabiano Franz 2012-05-31 10:44:22 EDT
The client tools are now fixed on rhc-0.93.16-1+ (reverted back to the version of previous Sprint). Please note that are still a few error related to snapshot restore but these are being handled on bug 826819.
Comment 10 yquan 2012-05-31 22:12:09 EDT
It fixed on rhc-0.93.18.

OpenShiftmatoMacBook-Pro:~ root# rhc sshkey list
Password: **


SSH keys
========
       Name: default
       Type: ssh-rsa
Fingerprint: 62:59:bf:8d:6a:d7:ce:15:7e:ba:71:8c:10:62:13:d9
Comment 11 yquan 2012-05-31 22:23:55 EDT
(In reply to comment #10)
> It fixed on rhc-0.93.18.
> 
> OpenShiftmatoMacBook-Pro:~ root# rhc sshkey list
> Password: **
> 
> 
> SSH keys
> ========
>        Name: default
>        Type: ssh-rsa
> Fingerprint: 62:59:bf:8d:6a:d7:ce:15:7e:ba:71:8c:10:62:13:d9

Sorry for the Comment10,I opened too many bug pages, My mistake.
It's reply for the bug 824318.




I tested this case on rhc-0.93.18 and devenv_1812.

It can restore successfully.


OpenShiftmatoMacBook-Pro:~ root# rhc app snapshot restore -a php0
Password: **

Restoring from snapshot php0.tar.gz...

Stopping application...
Waiting for stop to finish
Done
Removing old git repo: ~/git/php0.git/
Removing old data dir: ~/php0/app-root/data/*
Restoring ~/git/php0.git and ~/app-root/data
~/git/php0.git ~
~
Running .openshift/action_hooks/pre_build
Running .openshift/action_hooks/build
Running .openshift/action_hooks/deploy
Starting application...
Done
Running .openshift/action_hooks/post_deploy

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