Bug 811524 - Get improper error when trying to add MySQL and PostgreSQL at the same time.
Summary: Get improper error when trying to add MySQL and PostgreSQL at the same time.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-11 10:35 UTC by yquan
Modified: 2015-05-14 22:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-14 18:00:07 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description yquan 2012-04-11 10:35:02 UTC
Description of problem:
Add the MySQL and PostgreSQL at the same time,there are two kinds of results:
1. both  MySQL and PostgreSQL will return a successful page. Actually only one of them has been added successfully.

2. both of them return error massage, and can't add them again.

Version-Release number of selected component (if applicable):
devenv_1713
mysql-5.1.61-1.el6_2.1.x86_64
postgresql-8.4.9-1.el6_1.1.x86_64

How reproducible:
Random

Steps to Reproduce:
1.Create an app via Web
2.Open adding MySql page in a new tab by selecting MySql
3.Open adding postgresql page in a new tab by selecting postgresql
4.Click the button "add" at the same time in two pages

  
Actual results:
There are two kinds of results:
1. both  MySQL and PostgreSQL will return a successful page. Actually only one of them has been added successfully.

2. both of them return error massage, and can't add them again.
Expected results:
One of MySQL and PostgreSQL will be added successfully, and the one that  failed to be added  will have error massage.

Additional info:

Comment 1 Mrunal Patel 2012-04-11 16:51:13 UTC
Looks like a race condition. Should we only allow one request at a time (at the broker level) for adding embedded cartridges?

Comment 2 Dan McPherson 2012-05-29 14:58:58 UTC
The cartridges are currently enforcing this limitation but not in a race condition proof way.  The carts need to be changed to write DB_TYPE and check for DB_TYPE in the same code block.  Currently they check for DB_TYPE up top and then add DB_TYPE much later.


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