ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
Tested on 4.9.3.0 and 4.11.1.0
CONFIGURATION
API throttling is enabled with default throttling of 25 requests per second
OS / ENVIRONMENT
SUMMARY
Users reported that they weren't getting all apis listed in cloudmonkey when running a sync. After some debugging, I found that the problem is that the ApiDiscoveryService is calling ApiRateLimitServiceImpl.checkAccess(), so the results of the listApis command are being truncated because Cloudstack believes the user has exceeded their API throttling rate.
STEPS TO REPRODUCE
I enabled throttling with a 25 request per second limit. I then created a test role with only list* permissions and assigned it to a test user. When this user calls listApis, they will typically receive anywhere from 15-18 results. Checking the logs, you see The given user has reached his/her account api limit, please retry after 218 ms..
I raised the limit to 200 requests per second, restarted the management server and tried again. This time I got 143 results and no log messages about the user being throttled.
EXPECTED RESULTS
All of the apis the user has permission to access are listed
ACTUAL RESULTS
The user only gets a small number of apis listed in their results
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
API throttling is enabled with default throttling of 25 requests per second
OS / ENVIRONMENT
SUMMARY
Users reported that they weren't getting all apis listed in cloudmonkey when running a
sync. After some debugging, I found that the problem is that theApiDiscoveryServiceis callingApiRateLimitServiceImpl.checkAccess(), so the results of the listApis command are being truncated because Cloudstack believes the user has exceeded their API throttling rate.STEPS TO REPRODUCE
I enabled throttling with a 25 request per second limit. I then created a test role with only
list*permissions and assigned it to a test user. When this user callslistApis, they will typically receive anywhere from 15-18 results. Checking the logs, you seeThe given user has reached his/her account api limit, please retry after 218 ms..I raised the limit to 200 requests per second, restarted the management server and tried again. This time I got 143 results and no log messages about the user being throttled.
EXPECTED RESULTS
ACTUAL RESULTS