These two errors are identical, and only differ in timing. We should only return one of these (preferably 102 because that matches the old behavior). The message should also be identical. mongo_data_store.rb:576 raise StickShift::UserException.new("Domain already exists for #{user_id}", 158) if hash == nil domains_controller.rb:85 @reply.messages.push(Message.new(:error, "User already has a domain associated. Update the domain to modify.", 102)) This effects tests running in parallel in the devenv and causes spurious failures (we handle 102, but not 158). We will work around it for now but this should be fixed and any other duplicates resolved.
lowering severity to non-blocker
Error Codes: 102: A user with login already exists 158: Domain already exists for user Error codes are incorrectly assigned in some places in broker code. Fixed these incorrect assignments and duplicates in git revision 171375e359417. In <site-repo>/app/models/domain.rb, we need to remove L10 on_exit_code(102, :on_invalid => (Domain::UserAlreadyHasDomain = Class.new(ActiveResource::ResourceInvalid))) There may be more similar changes in site. Assigning to Clayton for site related changes.
We will do the right thing if the message is returned still, lowering severity.
https://github.com/openshift/origin-server/pull/700
Verified on devenv_2341 [qgong@localhost automation]$ curl -k -X POST -H 'Accept: application/xml' --user qgong:111111 https://ec2-184-73-124-141.compute-1.amazonaws.com/broker/rest/domains -d id=qgong9 <?xml version="1.0" encoding="UTF-8"?> <response> <version>1.2</version> <messages> <message> <field nil="true"></field> <text>Domain already exists for user. Update the domain to modify.</text> <exit-code>158</exit-code> <severity>error</severity> </message> </messages> <status>conflict</status> <supported-api-versions> <supported-api-version>1.0</supported-api-version> <supported-api-version>1.1</supported-api-version> <supported-api-version>1.2</supported-api-version> </supported-api-versions> <data> <datum nil="true"></datum> </data> <type nil="true"></type> </response>