Bug 1024588 - Met permission denied when snapshot save existing apps on INT after migration.
Met permission denied when snapshot save existing apps on INT after migration.
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Paul Morie
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-29 23:00 EDT by Liang Xia
Modified: 2015-05-14 19:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:27:36 EST
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)

  None (edit)
Description Liang Xia 2013-10-29 23:00:33 EDT
Description of problem:
After INT migration, snapshot existing apps, will met following error:
/bin/tar: ./526df0b703ef6483ce000005/app-root/runtime/.preupgrade_state: Warning: Cannot open: Permission denied

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

How reproducible:
always

Steps to Reproduce:
1.Create app on INT.
2.Upgrade and migrate the server.
3.Snapshot the app.


Actual results:
$ rhc snapshot save php
Pulling down a snapshot to php.tar.gz...
Creating and sending tar.gz
/bin/tar: ./526df0b703ef6483ce000005/app-root/runtime/.preupgrade_state: Warning: Cannot open: Permission denied
RESULT:
Success

$ rhc snapshot save jbossews2s
Pulling down a snapshot to jbossews2s.tar.gz...
Saving snapshot for secondary mysql-5.1 gear
Creating and sending tar.gz
Saving snapshot for secondary postgresql-8.4 gear
Creating and sending tar.gz
Saving snapshot for secondary mongodb-2.2 gear
Creating and sending tar.gz
Creating and sending tar.gz
/bin/tar: ./5264c9876cec0e4ccb00036e/app-root/runtime/.preupgrade_state: Warning: Cannot open: Permission denied
RESULT:
Success


Expected results:
Snapshot successfully without errors.


Additional info:
[jbossews2-lxiamigrate.int.rhcloud.com 5264c51403ef642922000319]\> ls -l app-root/runtime/.preupgrade_state
-rw-r-----. 1 root root 8 Oct 29 17:11 app-root/runtime/.preupgrade_state

.preupgrade_state does not exist in local tar.gz
[lxia@dhcp-8-109 5264c51403ef642922000319]$ ls -l app-root/runtime/.
./                                               .upgrade_complete_create_initial_deployment_dir
../                                              .upgrade_complete_inspect_gear_state
.stop_lock                                       .upgrade_complete_pre_upgrade
.upgrade_complete_add_deployments_dir            .upgrade_complete_restore_repo
.upgrade_complete_compute_itinerary              .upgrade_complete_stop_gear
.upgrade_complete_create_dep_symlinks            .upgrade_itinerary
Comment 1 Liang Xia 2013-10-30 04:05:29 EDT
However, doesn't met this error after migration from devenv_stage_528  to
devenv_3967.

# rhc snapshot save jbossews1s
Pulling down a snapshot to jbossews1s.tar.gz...
Saving snapshot for secondary mysql-5.1 gear
Creating and sending tar.gz
Saving snapshot for secondary postgresql-8.4 gear
Creating and sending tar.gz
Saving snapshot for secondary mongodb-2.2 gear
Creating and sending tar.gz
Creating and sending tar.gz
RESULT:
Success
Comment 2 Paul Morie 2013-10-30 14:39:09 EDT
PR submitted.
Comment 3 openshift-github-bot 2013-10-30 16:03:51 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/5d8f49f8314dbf9364fe45a8d1fb19bfd9321178
Fix bug 1024588: add exclusions for upgrade metadata in snapshot.rb
Comment 4 Liang Xia 2013-10-31 04:52:44 EDT
Verified on instance which is migrated from devenv_stage_528 to devenv_3973, steps and results listed below.

1.Create apps.
2.Upgrade and migrate the server.
3.SSH into instance and create 2 files in direcotry gear_UUID/app-root/runtime/ named .preupgrade_state,.upgrade_itinerary
4.Snapshot the app and check the result.

Snapshot successfully without errors, and .preupgrade_state,.upgrade_itinerary were excluded from the tar.gz

Move to verified.

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