Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1059429 - moving a gear will create an empty deployment dir
Summary: moving a gear will create an empty deployment dir
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: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
: 1057976 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-29 20:36 UTC by Brenton Leanhardt
Modified: 2015-05-14 23:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-26 19:10:48 UTC


Attachments (Terms of Use)

Description Brenton Leanhardt 2014-01-29 20:36:13 UTC
Description of problem:

Set up an environment with 2 nodes and move a gear.  On move the initial deployment directory is created and it not used since the previous deployment is rsync'd from the old gear.  During the move process an attempt is made to register the deployment but it fails with a 422 unprocessable intity since the metadata is nil.

A side-effect of a recent upstream change allows for this 422 to be ignored and the move to still be considered successful.  I suspect there may be gears with bogus deployment directories dangling.  There may also be excess 422s in the Broker logs.

Comment 1 Brenton Leanhardt 2014-01-29 20:37:05 UTC
Here's one approach for dealing with this: https://github.com/openshift/origin-server/pull/4616

Comment 3 Ben Parees 2014-02-05 15:59:08 UTC
*** Bug 1057976 has been marked as a duplicate of this bug. ***

Comment 4 Meng Bo 2014-02-08 06:45:45 UTC
Checked on devenv_4348, before and after move gear, the deployment dir is the same.

[root@ip-10-239-28-10 52f5cfa081c9849092000027]# ls app-deployments/
2014-02-08_01-33-10.039  by-id  current
[root@domU-12-31-39-04-70-20 52f5cfa081c9849092000027]# ls app-deployments/
2014-02-08_01-33-10.039  by-id  current


And for bug 1057976, the app can be restored successfully after move.

[root@domU-12-31-39-04-70-20 ~]# rhc snapshot restore ruby19
Restoring from snapshot ruby19.tar.gz...
Removing old git repo: ~/git/ruby19.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/ruby19.git and ~/app-root/data
Activation status: success

RESULT:
Success

move bug to verified.


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