Project

General

Profile

Actions

Bug #38619

closed

radosgw-admin user create can be executed repeatedly

Added by Hughen X about 5 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
easy first bug
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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

Also available in: Atom PDF