[
https://issues.apache.org/jira/browse/CLOUDSTACK-7073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14054302#comment-14054302
]
Alena Prokharchyk commented on CLOUDSTACK-7073:
-----------------------------------------------
Resolved by introducing domain_id field to the cloud.user table + adding the
constraint on username/domainId. DomainId in user table is being populated from
the corresponding account object.
For QA to verify the fix:
1) Write a script creating user with the fixed name
2) Run the script in parallel threads (10,100,200 threads). Make sure no user
with the same name can be created inside the same domain.
3) Check cloud.users table to make sure the domain_id field is being populated
and never stays as null
> Account/User creation: able to create user with the same name in the same
> domain in Clustered MS setup
> ------------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-7073
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7073
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.5.0
> Reporter: Alena Prokharchyk
> Assignee: Alena Prokharchyk
> Fix For: 4.5.0
>
>
> In the Java code we prohibit user to have duplicated names inside the same
> domain. But in the DB the constraint is missing in cloud.account/cloud.user
> table, so it is still possible to violate the rule by initiating the create
> call from parallel threads issued either by the same MS, or by multiple MS in
> the clustered MS setup.
> To fix, have to introduce some kind of the global lock, or db constraint
> preventing multiple threads to insert the record with the same username.
--
This message was sent by Atlassian JIRA
(v6.2#6252)