Bug 781254

Summary: Permission denied error occur when creating an existing domain using different account on different environment.
Product: OKD Reporter: Yujie Zhang <yujzhang>
Component: WebsiteAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: bmeng, dmcphers, rpenta, szhou, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhc-broker-0.84.42-1.el6_2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-30 05:03:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Permission denied. none

Description Yujie Zhang 2012-01-13 05:02:33 UTC
Created attachment 554979 [details]
Permission denied.

Description of problem:

Pernission denied error occur when creating an existing domain using different account on different environment.

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

https://stg.openshift.redhat.com

How reproducible:always


Steps to Reproduce:
1.Go to openshift and create domain A using account A,firefox browser.
2.Go to openshift and create domain A using account B,chrome browser on the same computer or change to another computer.
3.
  
Actual results:

"Permission denied-bind(2)" error came out.Details see in attachment.

Expected results:

The error message should be "A namespace with name '$domainA' already exists"

Additional info:

Comment 1 Yujie Zhang 2012-01-13 05:09:25 UTC
The issue also happens sometimes when using the same account to change domain,please check it.

Comment 2 Meng Bo 2012-01-13 09:23:14 UTC
Same error thrown when alter domain name via dsa key from rhc-client.

Log:

[mengbo@localhost .ssh]$ rhc-create-domain -n bmeng4s1 -l bmeng+4 -a -d
Password: 
OpenShift Express key found at /home/mengbo/.ssh/libra_id_dsa.  Reusing...
Submitting form:
debug: true
rhlogin: bmeng+4
Contacting https://stg.openshift.redhat.com
Response from server:
DEBUG:


Exit Code: 0
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
api_c: placeholder
API version:    1.1.2
Broker version: 1.1.1
Submitting form:
debug: true
namespace: bmeng4s1
alter: true
key_type: ssh-dss
ssh: AAAAB3NzaC1kc3MAAACBAOzX5HvAV3HuVKq2YvygbFGvQ0nsOlkhfELKaizcWNDxFDLhWKoS1n/QuezyIIG/xSx9iC6Wy+iIW4oudToXLCLD+oVsnnO+SHc5KfEEAU+m8zkOCXKsKHzYjCur8jzTLkEmeJQm/70/veJ6qZqhFi2I4IIKMErGH6GLsBgKfNXvAAAAFQDvw+tW1mPb0e6PztjjiB0hfkiGAwAAAIBwiY6miowN59d1FyDInIbDDHHID08i5EtKR3enujn/4EY7aTun39pVXmp70Bsd83Ak85KN47mRyNQs6sYgzMb/V1STdsXjT5xqTf7xxuh0y2mCyi9i27w/cN8L3XEVtQ0c69TepUQEHCbda9SHWeCTA5KiG5vRgako3F8wHgTsngAAAIBCoeVc72H41RcSljog6x1cAOM9ighl0RdsCZFfIIa4BT8flbnoNwPuwzaA7LdxMG6Z6yiiu/mALUGKODGAUSqwzaGMxXxVLL8ZJGBuLG/XQBi7g6plLFpXVCmEnOwwDFtd37ADHdGetyIMEv9LGTyfZfsGaVJcoeZvs9g5I+soqQ==
rhlogin: bmeng+4
Contacting https://stg.openshift.redhat.com
Problem reported from server. Response code was 500.

DEBUG:
Permission denied - bind(2)/usr/lib/ruby/1.8/resolv.rb:599:in `bind'
/usr/lib/ruby/1.8/resolv.rb:599:in `bind_random_port'
/usr/lib/ruby/1.8/resolv.rb:723:in `initialize'
/usr/lib/ruby/1.8/resolv.rb:508:in `new'
/usr/lib/ruby/1.8/resolv.rb:508:in `make_requester'
/usr/lib/ruby/1.8/resolv.rb:478:in `each_resource'

Exit Code: 1
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
api_c: placeholder
API version:    1.1.2
Broker version: 1.1.1

RESULT:
Permission denied - bind(2)

Comment 3 Dan McPherson 2012-01-13 16:12:12 UTC
I couldn't reproduce exactly this bug.  I was able to get a DNS exception if I try to take the same namespace right away.  But as long as I waited 10 secs or so it would give the correct message.  The best I could do was give a slightly better DNS error message if it does happen by blindly catching the exception and rethrowing a better one.

I did however find a really bad bug that when the error happened it was deleting the txt record.  I have fixed that in stage.   We should be able to even remove the dns exception when we move to mongo.

Comment 4 Meng Bo 2012-01-17 05:54:13 UTC
verified on devenv_217 with rhc-broker-0.85.1-1.el6_2.noarch

The "Permission denied - bind(2)" gone, and error message "Error communicating with DNS system. If the problem persists please contact Red Hat support." thrown instead of it. And after a few seconds, the correct error message "A namespace with name 'domainname' already exists" showed.

Comment 5 Meng Bo 2012-01-17 05:58:13 UTC
For the Comment#2, has the same situation.
It will got DNS error when change domain name rapidly. And will got successful after wait a few seconds.