Hide Forgot
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:
The issue also happens sometimes when using the same account to change domain,please check it.
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)
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.
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.
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.