Admin API - QoS
Create QOS for user (shell)
Instruction
- SSH into your Config / Installer node (Node 1) as training
- First lets ensure there are no QOS limits for engineer1
curl -s -X GET -k -u sysadmin:$auth_pass "https://$admin_endpoint:19443/qos/limits?userId=engineer1&groupId=Engineering" | python -mjson.tool
- A Value of -1 denotes there is no QOS limit for each of the QOS metrics.
Instruction
- Set QOS Storage Bytes for engineer1 to 10240 Kibibytes
curl -s -X POST -k -u sysadmin:$auth_pass "https://$admin_endpoint:19443/qos/limits?userId=engineer1&groupId=Engineering&storageQuotaKBytes=10240&storageQuotaCount=-1&wlRequestRate=-1&hlRequestRate=-1&wlDataKBytesIn=-1&hlDataKBytesIn=-1&wlDataKBytesOut=-1&hlDataKBytesOut=-1"
- We have to define an amount for ALL Limits even if we are only changing 1. We can check it has been updated using the previous curl command
curl -s -X GET -k -u sysadmin:$auth_pass "https://$admin_endpoint:19443/qos/limits?userId=engineer1&groupId=Engineering" | python -mjson.tool
Test QOS (Shell)
Instructions
-
Upload 5Mib file to myrf4bucket
-
Ensure that the upload fails. It fails because we already uploaded a 5Mb object into engineerbucket. We have set a QOS limit of 10Mib for the engineer1 users' buckets, this means the amount of data stored for the whole user must be less than 10Mib. 5Mib+5Mib would not be less than 10Mib. If we want to allow upto & including 10Mib we must use 1 byte more in the QOS setting
curl -s -X POST -k -u sysadmin:$auth_pass "https://$admin_endpoint:19443/qos/limits?userId=engineer1&groupId=Engineering&storageQuotaKBytes=10241&storageQuotaCount=-1&wlRequestRate=-1&hlRequestRate=-1&wlDataKBytesIn=-1&hlDataKBytesIn=-1&wlDataKBytesOut=-1&hlDataKBytesOut=-1"
-
This increases the QOS by 1 kibibyte (10241 instead of 10240). You can now upload the second 5mib object
s3cmd put 5mb s3://myrf4bucket
-
Lets set the QOS back to Unlimited
curl -s -X POST -k -u sysadmin:$auth_pass "https://$admin_endpoint:19443/qos/limits?userId=engineer1&groupId=Engineering&storageQuotaKBytes=-1&storageQuotaCount=-1&wlRequestRate=-1&hlRequestRate=-1&wlDataKBytesIn=-1&hlDataKBytesIn=-1&wlDataKBytesOut=-1&hlDataKBytesOut=-1"