Description of problem: user_name field has duplicate domain: user@domain@domain Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1.create user 2. 3. Actual results: 2014-09-04 13:26:04,024 - MainThread - users - DEBUG - Response body for CREATE request is: <user href="/ovirt-engine/api/users/ae5cd7ba-2783-4ef2-a134-2e3127d39934" id="ae5cd7ba-2783-4ef2-a134-2e3127d39934"> <name>xxx</name> <link href="/ovirt-engine/api/users/ae5cd7ba-2783-4ef2-a134-2e3127d39934/permissions" rel="permissions"/> <link href="/ovirt-engine/api/users/ae5cd7ba-2783-4ef2-a134-2e3127d39934/roles" rel="roles"/> <link href="/ovirt-engine/api/users/ae5cd7ba-2783-4ef2-a134-2e3127d39934/tags" rel="tags"/> <domain href="/ovirt-engine/api/domains/71612e6c-6162-2e74-6c76-2e7265646861" id="71612e6c-6162-2e74-6c76-2e7265646861"/> <domain_entry_id>61323461393732632D383736372D343565622D386263612D613863373439333234343666</domain_entry_id> <namespace>*</namespace> <user_name>xxx.tlv.redhat.com.tlv.redhat.com</user_name> <principal>xxx.tlv.redhat.com</principal> </user> Expected results: <user_name>xxx.tlv.redhat.com</user_name> Additional info:
The RESTAPI puts in the "user_name" element the long name of the user followed by @ and the domain name. In this case it looks like the backend populating the login name incorrectly.
Yair, it seems that legacy provider adds @domain to principal? <user_name>istein.tlv.redhat.com.tlv.redhat.com</user_name> <principal>istein.tlv.redhat.com</principal>
I think I know why it happens. This is because we put the principal within the user name within the user table now. So the restapi assumes this is the user name, although the user name may be out of date and never actually updated. Is there a reason for the legacy provider to have principal name with @suffix? If there is, options: 1. have two fields in database one for the legacy user name, the other for principal, the principal is to be used at ui. 2. revert and put the legacy user name within database, will make ui less readable but...
Another option... remove the @xxxx append to user name of the restapi?
BTW it also happens in CLI API
fixed in vt3, moving to on_qa. if you believe this bug isn't released in vt3, please report to rhev-integ