ceph: handles an user creation error if the store is missing
Currently if object store is missing user creation fails without throwing any error. Here the access and secret key values will be checked post the creation command Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
This commit is contained in:
1 parent
cb6881e401
commit
ab607075da
1 file changed
+2
@@ -81,6 +81,8 @@ func decodeUser(data string) (*ObjectUser, int, error) {
|
||||
if len(user.Keys) > 0 {
|
||||
rookUser.AccessKey = &user.Keys[0].AccessKey
|
||||
rookUser.SecretKey = &user.Keys[0].SecretKey
|
||||
} else {
|
||||
return nil, RGWErrorBadData, errors.New("AccessKey and SecretKey are missing")
|
||||
}
|
||||
|
||||
return &rookUser, RGWErrorNone, nil
|
||||
|
||||
Reference in new issue
Block a user