Project

General

Profile

Feature #43164

rgw: support specify user default placement and placement_tags when create or modify user

Added by joke lee 8 months ago. Updated 7 months ago.

Status:
Fix Under Review
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
placement
Backport:
nautilus
Reviewed:
Affected Versions:
Pull request ID:

Description

support create user and modify user's default placement by radosgw-admin and admin rest api

./bin/radosgw-admin user create --uid yly5 --display-name yly5 --access-key yly5 --secret-key yly5 -c ceph.conf --storage-class=STANDARD_IA --placement-id default-placement --tags=compress2,compress5 {
"user_id": "yly5",
"display_name": "yly5",
"email": "",
"suspended": 0,
"max_buckets": 1000,
"subusers": [],
"keys": [ {
"user": "yly5",
"access_key": "yly5",
"secret_key": "yly5"
}
],
"swift_keys": [],
"caps": [],
"op_mask": "read, write, delete",
"default_placement": "default-placement",
"default_storage_class": "STANDARD_IA",
"placement_tags": [
"compress2",
"compress5"
],
"bucket_quota": {
"enabled": false,
"check_on_raw": false,
"max_size": -1,
"max_size_kb": 0,
"max_objects": -1
},
"user_quota": {
"enabled": false,
"check_on_raw": false,
"max_size": -1,
"max_size_kb": 0,
"max_objects": -1
},
"temp_url_keys": [],
"type": "rgw",
"mfa_ids": []
}
< PUT /admin/user?format=json&uid=abcd&display-name=abcd&placement-tags=compress11,compress4 HTTP/1.1
< Host: 127.0.0.1:7480
< Content-Length: 0
< Accept-Encoding: gzip, deflate
< Accept: */*
< User-Agent: python-requests/2.6.0 CPython/2.7.5 Linux/3.10.0-1062.1.2.el7.x86_64
< Connection: keep-alive
< date: Tue, 29 Oct 2019 04:34:42 GMT
< Authorization: AWS admin:EH/JlHNEMX4aa3onFc0TYhbVLbg=
<

HTTP/1.1 200 OK
x-amz-request-id: tx000000000000000000001-005db7c162-17153-default
Content-Length: 765
Date: Tue, 29 Oct 2019 04:34:42 GMT
Connection: Keep-Alive

{"tenant":"","user_id":"abcd","display_name":"abcd","email":"","suspended":0,"max_buckets":1000,"subusers":[],"keys":[{"user":"abcd","access_key":"85PEW34P8ED0QG7G0T4M","secret_key":"Qy124TlL5xZbM94L3jjQrvrAZG8y8F1YXS222nIy"},{"user":"abcd","access_key":"EFCAFSM15PEQNT5MSVHL","secret_key":"xlDn14Wp4MY03I2CMrDRYsmFR9jbNKx4E3GZv6CL"}],"swift_keys":[],"caps":[],"op_mask":"read, write, delete","system":"false","admin":"false","default_placement":"","default_storage_class":"","placement_tags":["compress11","compress4"],"bucket_quota":{"enabled":false,"check_on_raw":false,"max_size":-1,"max_size_kb":0,"max_objects":-1},"user_quota":{"enabled":false,"check_on_raw":false,"max_size":-1,"max_size_kb":0,"max_objects":-1},"temp_url_keys":[],"type":"rgw","mfa_ids":[]}
DEBUG:requests.packages.urllib3.connectionpool:http://127.0.0.1:7480 "PUT /admin/user?format=json&uid=abcd&display-name=abcd&placement-tags=compress11,compress4 HTTP/1.1" 200 765

History

#1 Updated by Casey Bodley 7 months ago

  • Status changed from New to Fix Under Review
  • Tags set to placement
  • Backport set to nautilus
  • Pull request ID set to 31185

Also available in: Atom PDF