Bug 1121815 - Do not delete domain env variables until no app references them.
Summary: Do not delete domain env variables until no app references them.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1118703
TreeView+ depends on / blocked
 
Reported: 2014-07-22 01:19 UTC by xjia
Modified: 2015-07-20 00:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-22 20:57:57 UTC


Attachments (Terms of Use)

Description xjia 2014-07-22 01:19:22 UTC
Description of problem:
When the first app is created, domain env variables will be added in mongo. And the 2nd app will use these variables. But if delete the 2nd app, the domain env will be removed. 
This domain.env_vars might be recorded all the used app's component_id instead of only one component_id.

Version-Release number of selected component (if applicable):
devenv_4988
openshift-origin-cartridge-fuse-6.1.0.redhat.387-1.el6op.noarch.rpm

How reproducible:
always

Steps to Reproduce:
1. Create fuse app named fuse1, check domain.env_vars in mongo:
                {
                        "key" : "OPENSHIFT_FUSE_DOMAIN_ZOOKEEPER_URL",
                        "value" : "fuse1-jia.dev.rhcloud.com:38032",
                        "component_id" : ObjectId("53ccf97c6d011716f9000141")
                },
                {
                        "key" : "OPENSHIFT_FUSE_DOMAIN_ZOOKEEPER_PASSWORD",
                        "value" : "A7HGZegGHL3L",
                        "component_id" : ObjectId("53ccf97c6d011716f9000141")
                }

2. Create the 2nd fuse app named fuse2, check domain.env_vars in mongo(component_id is recovered!):
                {
                        "key" : "OPENSHIFT_FUSE_DOMAIN_ZOOKEEPER_URL",
                        "value" : "fuse1-jia.dev.rhcloud.com:38032",
                        "component_id" : ObjectId("53ccfbc76d011716f900015b")
                },
                {
                        "key" : "OPENSHIFT_FUSE_DOMAIN_ZOOKEEPER_PASSWORD",
                        "value" : "A7HGZegGHL3L",
                        "component_id" : ObjectId("53ccfbc76d011716f900015b")
                }
3.delete fuse2 app, these variables will be removed. 

Actual results:
Step3: None

Expected results:
Step3: Need still keep these variables

Comment 1 Derek Carr 2014-07-22 20:59:01 UTC
Domain environment variables are tied to a component in order to support cleanup when said component is removed.  They are intended to only be used to advertise among components across the domain (i.e Jenkins use case) and not be component indepedent at this time.


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