bmcweb
bmcweb copied to clipboard
Error message not proper while creating 16th user via Redfish
While creating 16th user via Redfish, we get below error. Here you can see that message says that - its unable to create user as it already exist (which is not true).
"Message": "The requested resource of type #ManagerAccount.v1_0_3.ManagerAccount with the property UserName with the value rahul15 already exists.",
It should say something like - "New user cannot be created as max user limit reached."
bash-4.1$curl -k -H "X-Auth-Token: $bmc_token" -X POST https://${BMC_IP}/redfish/v1/AccountService/Accounts -d '{"UserName":"rahul15", "Password":"0penBmc1", "RoleId":"Administrator", "Enabled":true}'
{
"[email protected]": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "The requested resource of type #ManagerAccount.v1_0_3.ManagerAccount with the property UserName with the value rahul15 already exists.",
"MessageArgs": [
"#ManagerAccount.v1_0_3.ManagerAccount",
"UserName",
"rahul15"
],
"MessageId": "Base.1.4.0.ResourceAlreadyExists",
"Resolution": "Do not repeat the create operation as the resource has already been created.",
"Severity": "Critical"
}
]
}bash-4.1$
Existing users
bash-4.1$ curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${BMC_IP}/redfish/v1/AccountService/Accounts/
{
"@odata.context": "/redfish/v1/$metadata#ManagerAccountCollection.ManagerAccountCollection",
"@odata.id": "/redfish/v1/AccountService/Accounts",
"@odata.type": "#ManagerAccountCollection.ManagerAccountCollection",
"Description": "BMC User Accounts",
"Members": [
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul5"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul14"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul11"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul7"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul13"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/root"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul12"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul4"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul8"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul10"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul3"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul9"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul1"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul2"
},
{
"@odata.id": "/redfish/v1/AccountService/Accounts/rahul6"
}
],
"[email protected]": 15,
"Name": "Accounts Collection"
@rthomaiy (Just adding my name, to track). Will try to address the same in few weeks
Note, "New user cannot be created as max user limit reached." is not the correct error message.
CreateLimitReachedForResource message states: "The create operation failed because the resource has reached the limit of possible resources." This is the correct error to include.
No progress or updates on this bug in 4 years. Closing. Feel free to reopen if someone is working on this.