Bug 1024588 - Met permission denied when snapshot save existing apps on INT after migration.
Summary: Met permission denied when snapshot save existing apps on INT after migration.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Paul Morie
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-30 03:00 UTC by Liang Xia
Modified: 2015-05-14 23:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:27:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Liang Xia 2013-10-30 03:00:33 UTC
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 08:05:29 UTC
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 18:39:09 UTC
PR submitted.

Comment 3 openshift-github-bot 2013-10-30 20:03:51 UTC
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 08:52:44 UTC
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.