Bug 809230

Summary: App destroy doesn't always remove things in the right order
Product: OKD Reporter: Thomas Wiest <twiest>
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: adietish, jialiu, mpatel
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-13 18:31:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Wiest 2012-04-02 19:14:33 UTC
Description of problem:
When destroying an app, sometimes the main app gets removed before the embedded cartridges.

For instance, when I was trying to destroy one of my apps named 'drupal', it removed the main app dir before the mysql embedded dir. Then when mysql went to unembed itself, it errored with this:

------
drupal.  Application directory doesn't exist:  /var/lib/stickshift/10f90d2d524342c39ea598afd775ab85/drup
al

------)

I sent krishna my mongo entry and he said this:

(03/30/2012 02:51:04 PM) kraman: twiest: based on the mongo data you sent me.. my guess is that at some point we had a bug in the code that generates (de)configuration order which has since been fixed. this app's configuration order seems to be wonky. we might need a migration to fixup apps like this on stage/prod


Version-Release number of selected component (if applicable):
rhc-node-0.89.2-1.el6_2.x86_64


How reproducible:
Very sporadic / random. I've created an app, added mysql and then destroyed the app a few times after, and it didn't seem to have the problem.'

I've also tried idling the app before destroying it and this _doesn't_ seem to cause the issue to occur.


Steps to Reproduce:
1. unsure, it's totally random and we're not sure if the bug even still exists.


Actual results:
Destroy sometimes fails unembedding mysql with:
"Application directory doesn't exist"


Expected results:
The app should be reliably destroyed.

Comment 1 Rajat Chopra 2012-04-04 22:44:23 UTC
No bug with configure order. The way we store it in mongo has changed. The new code, if run with the old configure order creates this problem.

We need to run a migration script to port the old apps to new way of storing the configure_order.

Migration script checked in with rev#c158bc7d7e1f1d41addff7ef687c8fc3058bd7b7

Comment 2 Johnny Liu 2012-04-06 11:18:41 UTC
Verified this bug with migrate-mongo-2.0.8a, and PASS.


Reproduce step:
1. Launch a sprint7 release instance (devenv-150)
2. Create an app, and embed mysql to it.
3. According to devel's ticket, run migrate steps.
4. Try to destroy this app, but failed as above.

Verified steps:
1. Launch a sprint7 release instance (devenv-150)
2. Create an app, and embed mysql to it.
3. According to devel's ticket, run migrate steps
4. Run migrate-mongo-2.0.8a
5. Destroy this app successfully.