mdesaive opened a new issue #2707: Moving User with API key fails through MySQLIntegrityConstraintViolationException URL: https://github.com/apache/cloudstack/issues/2707 <!-- Verify first that your issue/request is not already reported on GitHub. Also test if the latest release and master branch are affected too. Always add information AFTER of these HTML comments, but no need to delete the comments. --> ##### ISSUE TYPE <!-- Pick one below and delete the rest --> * Bug Report ##### COMPONENT NAME <!-- DB API --> ~~~ ~~~ ##### CLOUDSTACK VERSION <!-- 4.11.0.0 --> ~~~ Advanced Networking, Cloudstack 4.11.0.0 on Ubuntu 14.04 LTS, MySQL 5.5.59-0ubuntu0.14.04.1 ~~~ ##### CONFIGURATION <!-- Information about the configuration if relevant, e.g. basic network, advanced networking, etc. N/A otherwise --> ##### OS / ENVIRONMENT <!-- Information about the environment if relevant, N/A otherwise --> ##### SUMMARY <!-- Explain the problem/feature briefly --> The API call "moveUser" on a user with an API key fails with a MySQLIntegrityConstraintViolationException. Moving a user without API key works perfectly. Looks to me, as if there is a constraint on mySQL not allowing to have a new user with the same API key to be prepared. ##### STEPS TO REPRODUCE <!-- For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate. For new features, show how the feature would be used. --> <!-- Paste example playbooks or commands between quotes below --> ~~~ Prepare user with an API key. Call "move user id=<user-id> account=<destination account name>" ~~~ <!-- You can also paste gist.github.com links for larger files --> ##### EXPECTED RESULTS <!-- What did you expect to happen when running the steps above? --> ~~~ The user to be moved to the destination account. ~~~ ##### ACTUAL RESULTS <!-- What actually happened? --> <!-- Paste verbatim command output between quotes below --> ~~~ API call returns with: -- (rz-admin) :D > move user id=56fab0c7-6724-46c0-9904-eff4020485ad account=AdminTeam-Intern-Individuell Error 530: Entity already exists: { "cserrorcode": 9999, "errorcode": 530, "errortext": "Entity already exists: ", "uuidList": [] } -- Exception in /var/log/cloudstack/management/management-server.log: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '<the api key>' for key 'i_user__api_key' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~~~
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
