Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Moving User with API key fails through MySQLIntegrityConstraintViolationException #2707

Copy link
Copy link
@mdesaive

Description

@mdesaive
Issue body actions
ISSUE TYPE
  • Bug Report
COMPONENT NAME

CLOUDSTACK VERSION
Advanced Networking, Cloudstack 4.11.0.0 on Ubuntu 14.04 LTS,
MySQL 5.5.59-0ubuntu0.14.04.1
CONFIGURATION
OS / ENVIRONMENT
SUMMARY

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
Prepare user with an API key.
Call "move user id=<user-id> account=<destination account name>"
EXPECTED RESULTS
The user to be moved to the destination account.
ACTUAL RESULTS
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)

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.