Bug 1123893

Summary: [origin_node_401]Unexpected error "Cartridge manifest not found" appears if add one different cartridge after deleting the existing one via oo-cartridge
Product: OpenShift Container Platform Reporter: Brenton Leanhardt <bleanhar>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED DEFERRED QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1.0CC: jhonce, jokerman, libra-bugs, libra-onpremise-devel, mmccomas, wzheng
Target Milestone: ---Keywords: Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1121864 Environment:
Last Closed: 2014-09-12 19:59:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1121864    
Bug Blocks:    

Description Brenton Leanhardt 2014-07-28 14:54:54 UTC
+++ This bug was initially created as a clone of Bug #1121864 +++

Description:
If there is a cartridge existing in container, for example php, and try to add another different cartridge via oo-cartridge after deleting the existing one, there will be an error appears although the cartridge can be added successfully: 
Cartridge add failed
CLIENT_ERROR: Unexpected error: Cartridge manifest not found: /var/lib/openshift/123456/php/metadata/manifest.yml missing

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

How reproducible:
always

steps to Reproduce:
1. Create a container:
#oo-devel-node app-create --with-container-uuid '123456' --with-app-uuid '123456' --with-namespace 'dom1' --with-app-name 'app1'
2. Add a cartridge to it
#oo-cartridge  --with-container-uuid 123456 --action add --with-cartridge-name php-5.3
3. Delete the cartridge
#oo-cartridge --with-container-uuid 123456 --action delete --with-cartridge-name php-5.3
4. Add a different one 
#oo-cartridge  --with-container-uuid 123456 --action add --with-cartridge-name mysql-5.5

Actual results:
An error appears, however the cartridge can be added successfully:
Cartridge add failed
Cartridge manifest not found: /var/lib/openshift/123456/php/metadata/manifest.yml missing

Expected results:
It should be added without any errors.

Additional info:
There is no this error if try to add a same cartridge type in step 4.

--- Additional comment from Jhon Honce on 2014-07-24 14:43:23 EDT ---

Fixed in https://github.com/openshift/origin-server/pull/5656

--- Additional comment from openshift-github-bot on 2014-07-24 16:30:27 EDT ---

Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/05b073ade1cd747e0fbcc4a88fb928a483120dd5
Bug 1121864 - Cleanup OPENSHIFT_PRIMARY_CARTRIDGE_DIR

--- Additional comment from Wenjing Zheng on 2014-07-24 21:52:39 EDT ---

Verified on devenv_5008, the cartridge can be added after another different cartridge being deleted.

Comment 1 Brenton Leanhardt 2014-07-28 14:57:37 UTC
Whoever backports this should make sure they label Bug #1123891 ON_QA as well.

Comment 2 Brenton Leanhardt 2014-09-12 19:59:00 UTC
We'll pick this up in the next rebase.