Bug 1140378

Summary: Domain env variables not cleaned up if app create fails/canceled
Product: OpenShift Container Platform Reporter: Brenton Leanhardt <bleanhar>
Component: NodeAssignee: Luke Meyer <lmeyer>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 2.1.0CC: abhgupta, adellape, bparees, jokerman, libra-bugs, libra-onpremise-devel, mmccomas, xjia
Target Milestone: ---Keywords: Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-openshift-origin-controller-1.23.10.14-1.el6op Doc Type: Bug Fix
Doc Text:
Previously, domain environment variables were not removed after an application failed during creation or if the operation was canceled by the user. As a result, attempting to later create an application with the same name would fail because MongoDB records still existed for the failed application. This bug fix updates the pending operations logic to remove domain environment variables and SSH keys for an application if the creation fails or is canceled.
Story Points: ---
Clone Of: 1140265 Environment:
Last Closed: 2014-10-02 13:59:53 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: 1140265    
Bug Blocks:    

Description Brenton Leanhardt 2014-09-10 19:55:27 UTC
+++ This bug was initially created as a clone of Bug #1140265 +++

Description of problem:
See JIRA: https://issues.jboss.org/browse/ENTESB-1926

--- Additional comment from Abhishek Gupta on 2014-09-10 15:52:35 EDT ---

This was a similar bug that got fixed --> https://bugzilla.redhat.com/show_bug.cgi?id=1126826

Corresponding PR --> https://github.com/openshift/origin-server/pull/5717

Comment 3 Luke Meyer 2014-09-22 16:44:33 UTC
*** Bug 1131011 has been marked as a duplicate of this bug. ***

Comment 4 Luke Meyer 2014-09-22 16:51:55 UTC
Cherry-picking:
commit 9e02f63c0044b3c76eb77c492672c08ac3436196
Author: Abhishek Gupta <abhgupta>
Date:   Fri Aug 15 16:38:07 2014 -0700

    Bug 1126826: cleaning up domain env vars and ssh keys on rollback

Comment 9 xjia 2014-09-23 06:06:52 UTC
Version: 2.1.z/2014-09-22.2/
Verify:
1. Create a fuse application. Check mongodb:
"env_vars" : [
		{
			"key" : "OPENSHIFT_FUSE_DOMAIN_DNS",
			"value" : "fuse-jia.fuse-vsphere.com",
			"component_id" : ObjectId("5420eb8e1018d6c3ca000054"),
			"unique" : false
		},
		{
			"key" : "OPENSHIFT_FUSE_DOMAIN_SSH_PORT",
			"value" : "43827",
			"component_id" : ObjectId("5420eb8e1018d6c3ca000054"),
			"unique" : false
		},
		{
			"key" : "OPENSHIFT_FUSE_DOMAIN_ZOOKEEPER_URL",
			"value" : "fuse-jia.fuse-vsphere.com:43826",
			"component_id" : ObjectId("5420eb8e1018d6c3ca000054"),
			"unique" : false
		},
		{
			"key" : "OPENSHIFT_FUSE_DOMAIN_PASSWORD",
			"value" : "D-geyXLppXaJ",
			"component_id" : ObjectId("5420eb8e1018d6c3ca000054"),
			"unique" : false
		}
	],
2. From Hawtio, create 20 containers at the same time.At the end, most of them are created failed. 
3. Check mongodb, env_vars valude is not changed.
	"env_vars" : [
		{
			"key" : "OPENSHIFT_FUSE_DOMAIN_DNS",
			"value" : "fuse-jia.fuse-vsphere.com",
			"component_id" : ObjectId("5420eb8e1018d6c3ca000054"),
			"unique" : false
		},
		{
			"key" : "OPENSHIFT_FUSE_DOMAIN_SSH_PORT",
			"value" : "43827",
			"component_id" : ObjectId("5420eb8e1018d6c3ca000054"),
			"unique" : false
		},
		{
			"key" : "OPENSHIFT_FUSE_DOMAIN_ZOOKEEPER_URL",
			"value" : "fuse-jia.fuse-vsphere.com:43826",
			"component_id" : ObjectId("5420eb8e1018d6c3ca000054"),
			"unique" : false
		},
		{
			"key" : "OPENSHIFT_FUSE_DOMAIN_PASSWORD",
			"value" : "D-geyXLppXaJ",
			"component_id" : ObjectId("5420eb8e1018d6c3ca000054"),
			"unique" : false
		}
	],

Comment 11 errata-xmlrpc 2014-10-02 13:59:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1353.html