Bug 1157643

Summary: Race condition between destroy-app and configure leaves broken vhost conf
Product: OpenShift Container Platform Reporter: Brenton Leanhardt <bleanhar>
Component: ContainersAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.2.0CC: adellape, admiller, anli, cryan, jokerman, libra-bugs, libra-onpremise-devel, lmeyer, mmccomas, rchopra, wzheng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-openshift-origin-frontend-apache-vhost-0.10.1.3-1.el6op Doc Type: Bug Fix
Doc Text:
A race condition existed between destroy-app and configure actions for the same application. When the configure action timed out in MCollective and the broker tried to destroy the application, it was possible for artifacts to be left behind in apache-vhost configuration files. As a result, applications could become unreachable. This bug fix updates the apache-vhost front-end server plug-in to verify whether the directory exists before configuring apache-vhost configuration files, and the artifacts are no longer left behind.
Story Points: ---
Clone Of: 1156361 Environment:
Last Closed: 2014-11-25 16:18:26 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: 1156361    
Bug Blocks:    

Comment 1 Luke Meyer 2014-10-28 10:24:43 UTC
Race condition between destroy-app and configure for the same app (when the configure times out in mcollective and the broker tries to destroy it) can leave behind artifacts in the vhost conf.

Comment 5 Anping Li 2014-11-05 14:49:14 UTC
Verified the race condition with the following steps, all seems well. 

1) Drop the @app_path, and oo-devel-node frontend-connect to app, no exsit path was reported. 

With vhost: rubygem-openshift-origin-frontend-apache-vhost-0.10.1.1-1.el6op.noarch
root@node1 .httpd.d]# oo-devel-node frontend-connect --with-container-uuid  545a12040ba583ce5b000050
No such file or directory - /etc/httpd/conf.d/openshift/545a12040ba583ce5b000050_hanli1dom_sphp/599999_element-.conf

With vhost: rubygem-openshift-origin-frontend-apache-vhost-0.10.1.3-1.el6op.noarch

[root@node1 .httpd.d]# oo-devel-node frontend-connect --with-container-uuid 5459a74d006e812603000046
Base directory /etc/httpd/conf.d/openshift/5459a74d006e812603000046_hanli1dom_php54 does not exist for the app: php54-hanli1dom.ose22-20141105.com.cn

2) Modify MCOLLECTIVE_TIMEOUT=20, and add alias and destroy 50 apps. and there isn't redundant files /var/lib/openshift

Comment 7 errata-xmlrpc 2014-11-25 16:18:26 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.

https://rhn.redhat.com/errata/RHBA-2014-1903.html