[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14205709#comment-14205709
 ] 

Prachi Damle commented on CLOUDSTACK-7073:
------------------------------------------

This change needs to be reverted.

It will cause issues with db upgrade like this : 
https://issues.apache.org/jira/browse/CLOUDSTACK-7590

So the databases prior to 4.5, which allowed the duplicate usernames will fail 
to upgrade to 4.5 due to this schema change.
Also, traditionally we have the 'removed' column in the DB to mark a user as 
removed, and there was no unique constraint allowing us to add another user 
with same name.
So older schemas will have such removed users, which we cannot delete for 
history purposes.

This issue needs to be fixed via java code.


> 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.3.4#6332)

Reply via email to