Bug 844573 - multiple domains can be created at the same time for one account
Summary: multiple domains can be created at the same time for one account
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-31 05:58 UTC by Meng Bo
Modified: 2015-05-15 02:02 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 20:42:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
development log (7.48 KB, text/x-log)
2012-07-31 05:58 UTC, Meng Bo
no flags Details

Description Meng Bo 2012-07-31 05:58:47 UTC
Created attachment 601430 [details]
development log

Description of problem:
Open two terminals, run the rhc domain create command at the same time, two domains will be created.

Version-Release number of selected component (if applicable):
rhc-0.96.5
devenv_1922

How reproducible:
always

Steps to Reproduce:
1.Open two terminal
2.rhc domain create -n bmengdev1 -pxxx
3.rhc domain create -n bmengdev2 -pxxx
4.run the two commands same time (in my case, I ran them one by one less than 1 second)
  
Actual results:
There are two domains can be created successfully.

Expected results:
The first one can be created, and the second one should be failed.

Additional info:
[bmeng@localhost ~]$ rhc domain show

User Info
=========
Namespace(0): bmengdev1
Namespace(1): bmengdev2
  RHLogin: bmeng


Application Info
================
No applications found.  You can use 'rhc app create' to create new applications.


I attached the development log as attachment.

Comment 1 Dan McPherson 2012-07-31 15:10:20 UTC
Ravi, can you take a look at this please.

Comment 2 John Poelstra 2012-07-31 17:08:26 UTC
expect to have fixed in 2 hours

Comment 3 Ravi Sankar 2012-07-31 21:24:07 UTC
Fixed in git rev fd06a2d74530535b.

Comment 4 Meng Bo 2012-08-01 10:34:31 UTC
Checked on devenv_1931, only one domain can be created by the same steps.
Mark bug as verified.

Comment 5 Meng Bo 2012-08-02 02:55:19 UTC
Try it again on devenv_1933, it will fail when create the 2nd domain at the same time with the 1st one. But when I trying to alter domain name to the 2nd one, it will return that the domain name already exist.

So it means, although the domain creation failed from client and server side, the DNS had been registered by DYN. And the domain name cannot be used anymore.

Reopen this bug for this situation.

========
development log:

DEBUG: DYNECT Response: {"status": "success", "data": {"zone": "rhcloud.com", "ttl": 60, "fqdn": "bmengdev1.dev.rhcloud.com", "record_type": "TXT", "rdata": {"txtdata": "Text record for bmengdev1"}, "record_id": 0}, "job_id": 149559334, "msgs": [{"INFO": "add: Record added", "SOURCE": "BLL", "ERR_CD": null, "LVL": "INFO"}]}
DEBUG: DYNECT Response: {"status": "success", "data": {"zone": "rhcloud.com", "ttl": 60, "fqdn": "bmengdev2.dev.rhcloud.com", "record_type": "TXT", "rdata": {"txtdata": "Text record for bmengdev2"}, "record_id": 0}, "job_id": 149559333, "msgs": [{"INFO": "add: Record added", "SOURCE": "BLL", "ERR_CD": null, "LVL": "INFO"}]}

Comment 6 John Poelstra 2012-08-02 17:10:15 UTC
expecting fix in 2 hours

Comment 7 Ravi Sankar 2012-08-02 20:36:31 UTC
Fixed in git rev 7ffcefbe57de3.

Comment 8 Meng Bo 2012-08-03 02:42:42 UTC
Checked on today's stage and devenv-stage_228, issue has been fixed.
The second domain will be deregistered automactically if the creation failed.

==========

DEBUG: DYNECT delete with path: /REST/TXTRecord/rhcloud.com/bmengdev2.dev.rhcloud.com/ and headers: {"Auth-Token"=>"[hidden]", "Content-Type"=>"application/json"}
DEBUG: DYNECT Response: {"status": "success", "data": {}, "job_id": 150241550, "msgs": [{"INFO": "delete: 1 records deleted", "SOURCE": "API-B", "ERR_CD": null, "LVL": "INFO"}]}


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