Bug 978554 - App restore breaks when using drupal quickstart
Summary: App restore breaks when using drupal quickstart
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-26 19:19 UTC by Paul Morie
Modified: 2015-05-15 00:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-19 21:25:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Paul Morie 2013-06-26 19:19:25 UTC
Description of problem:

Restoring a snapshot of an application which uses the current version of the drupal quickstart fails as follows:

Removing old git repo: ~/git/drupal.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/51cb3a7b9db7df0f97000001.git and ~/app-root/data
/bin/tar: app-root/data/sites/default/settings.php: Cannot open: Permission denied
/bin/tar: Exiting with failure status due to previous errors
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.11.1/lib/openshift-origin-node/utils/shell_exec.rb:130:in `block (2 levels) in oo_spawn': Shell command '/bin/$
ar --strip=2 --overwrite -xmz ./*/app-root/data ./*/git --transform="s|${OPENSHIFT_GEAR_NAME}/data|app-root/data|" --transform="s|git/.*\.git|git/${OPENSHIFT_GEAR_NAME}.git|" $
-exclude="./*/app-root/runtime/data" --exclude="./*/cron/data" --exclude="./*/php/data" --exclude="./*/mysql/data" --exclude="./*/git/*.git/hooks" 1>&2' returned an error. rc=$
 (OpenShift::Utils::ShellExecutionException)
        from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.11.1/lib/openshift-origin-node/utils/shell_exec.rb:93:in `pipe'
        from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.11.1/lib/openshift-origin-node/utils/shell_exec.rb:93:in `block in oo_spawn'
        from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.11.1/lib/openshift-origin-node/utils/shell_exec.rb:92:in `pipe'
        from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.11.1/lib/openshift-origin-node/utils/shell_exec.rb:92:in `oo_spawn'
        from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.11.1/lib/openshift-origin-node/model/application_container.rb:934:in `extract_restore_archive'
        from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.11.1/lib/openshift-origin-node/model/application_container.rb:875:in `restore'
        from /usr/bin/gear:280:in `block (2 levels) in <main>'

The file in question is owned by the user, but is not writable by the owner - this should be changed in the drupal quickstart.

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


How reproducible:


Steps to Reproduce: Create an app using the current drupal quickstart:

1. rhc app create drupal php-5.3 mysql-5.1 cron --from-code https://github.com/openshift/drupal-quickstart

2. rhc snapshot save drupal
3. rhc snapshot restore drupal

Actual results: Snapshot restore fails


Expected results: Snapshot restore should succeed


Additional info:

Comment 1 Clayton Coleman 2013-07-05 16:23:09 UTC
Drupal sets this on every restart - there's very little we can do to change that.  Why doesn't a restore overwrite read-only files?

Comment 2 Ben Parees 2014-03-19 21:25:16 UTC
I just tried this and snapshot restore succeeds (no error reported, app is available after the restore)

Comment 3 Ben Parees 2014-03-19 21:29:00 UTC
(as a follow up, it appears to work because drupal no longer marks that file read only from what I see)


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