Actions
Bug #38619
closedradosgw-admin user create can be executed repeatedly
Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Tags:
easy first bug
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Description
Background:
ceph version: 12.2.7 (3ec878d1e53e1aeb47a9f619c49d9e7c0aa384d5) luminous (stable)
Step to reproduce:
radosgw-admin user info --uid="test-user"
{ "user_id": "test-user", "display_name": "test-user", "email": "test-user@a.com", "keys": [ { "user": "test-user", "access_key": "AAAAAAAAAAAAAAAAAAA", "secret_key": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" } ], }
test-user
already exists, then I can continue to use the create command but nothing seems to happen.radosgw-admin user create --uid=test-user --display-name="test-user"
But if I use the following command, I will receive an error that the user already has, and the exit code of the radosgw-admin
command is 17
radosgw-admin user create --uid=test-user
# could not create user: unable to create user, user: test-user exists
Problem:
Why is there such a difference after the --diplay-name
parameter?
In addition, I think the semantics of the interface design for creating users in the object storage Admin Ops API
are not clear.
Since all users are created, if this user already exists, it should return the error of UserExists
or EmailExists
, instead of adding a key for the user, as it is now.
Actions