Bug 978554 - App restore breaks when using drupal quickstart
App restore breaks when using drupal quickstart
Product: OpenShift Online
Classification: Red Hat
Component: Image (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan Mace
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-06-26 15:19 EDT by Paul Morie
Modified: 2015-05-14 20:33 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-03-19 17:25:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Paul Morie 2013-06-26 15:19:25 EDT
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=$
        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 12:23:09 EDT
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 17:25:16 EDT
I just tried this and snapshot restore succeeds (no error reported, app is available after the restore)
Comment 3 Ben Parees 2014-03-19 17:29:00 EDT
(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.