Bug 854371
Summary: | api: Misleading status / returned object when trying to create user with incomplete parameters | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Oded Ramraz <oramraz> | |
Component: | ovirt-engine-restapi | Assignee: | Ori Liel <oliel> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ilia Meerovich <iliam> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 3.1.0 | CC: | bazulay, cpelland, dyasny, ecohen, iheim, italkohe, lpeer, michal.skrivanek, mkenneth, mpastern, ofrenkel, oliel, oramraz, Rhev-m-bugs, sgrinber, yeylon, ykaul, yzaslavs | |
Target Milestone: | --- | Keywords: | Reopened, ZStream | |
Target Release: | 3.2.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | infra | |||
Fixed In Version: | SF3 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 877053 (view as bug list) | Environment: | ||
Last Closed: | 2012-09-05 07:45:23 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 877053, 915537 |
Description
Oded Ramraz
2012-09-04 19:19:42 UTC
I see wrong behavior when adding VM with --user-name parameter: It seems like it search according to last name , and if there are few users with same last name it added the first one: [RHEVM shell (connected)]# create user --user_name test --domain-name qa.lab.tlv.redhat.com id : 841a2169-d509-4e02-9c42-e3a5b7e86165 name : Audio01 domain-id : 71612e6c-6162-2e74-6c76-2e7265646861 domain-name : qa.lab.tlv.redhat.com groups-group-name: qa.lab.tlv.redhat.com/QA-All-Users/RDP-Group groups-group-name: qa.lab.tlv.redhat.com/QA-All-Users/LocalAdmins-Group last_name : Test user_name : Audio01.com (In reply to comment #1) > I see wrong behavior when adding VM with --user-name parameter: > It seems like it search according to last name , and if there are few users > with same last name it added the first one: > > [RHEVM shell (connected)]# create user --user_name test --domain-name > qa.lab.tlv.redhat.com > > id : 841a2169-d509-4e02-9c42-e3a5b7e86165 > name : Audio01 > domain-id : 71612e6c-6162-2e74-6c76-2e7265646861 > domain-name : qa.lab.tlv.redhat.com > groups-group-name: qa.lab.tlv.redhat.com/QA-All-Users/RDP-Group > groups-group-name: qa.lab.tlv.redhat.com/QA-All-Users/LocalAdmins-Group > last_name : Test > user_name : Audio01.com no, it's LDAP search by username in AD (In reply to comment #0) > Description of problem: > > Misleading status / returned object when trying to create user with > incomplete parameters ( see additional information ) > > Version-Release number of selected component (if applicable): > > > How reproducible: > > > Steps to Reproduce: > 1. > 2. > 3. > > Actual results: > > > Expected results: > > > Additional info: > > [RHEVM shell (connected)]# create user --user_name test > > id : fdfc627c-d875-11e0-90f0-83df133b58cc > name : admin > domain-id : 696e7465-726e-616c-696e-7465726e616c > domain-name: internal > user_name : admin@internal > > [RHEVM shell (connected)]# status > > last command status: 0 (OK) if BE doesn't fail action, it's succeeded from cli PoV Please fix this behavior: [RHEVM shell (connected)]# create user --user_name no_such_user id : fdfc627c-d875-11e0-90f0-83df133b58cc name : admin domain-id : 696e7465-726e-616c-696e-7465726e616c domain-name: internal user_name : admin@internal The user is not created and I get object with admin@internal instead. so this is api bug and not cli's Problem in Backend code, any search on 'interna' domain, regardless of the fileter, returns the 'admin' user (note that if domain is not passed in the request, the default domain, which is 'interna', is used). The create user command did not specify from which domain to extract the user. Is this a valid behaviour ? In reply to comment #4 - IMHO this should have been a separate bug. Comment #1 - Comment #3 dealt with some other issue. I also think this is a matter of engine bug - internal broker has limited functionality, and IIRC, will return the admin@internal user for each search query. (In reply to comment #7) > The create user command did not specify from which domain to extract the > user. > Is this a valid behaviour ? not valid indeed, ori please add domain to validate() [RHEVM shell (connected)]# create user --user_name test *** Unknown syntax: create user --user_name test Verified sf5 3.2 has been released 3.2 has been released 3.2 has been released 3.2 has been released 3.2 has been released |