Bug #31024
closedHost show api endpoint is slow for non-admin user
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1667647
Description of problem:
When a non-admin user fetches host details, it takes much more time than for admin user. Something similar like:
https://bugzilla.redhat.com/show_bug.cgi?id=1598855
but just for getting host info, not editing.
When applied upstream patch from bz1598855 to Sat 6.4.1, no improvement in performance was noticed. So it is a separate issue (or not sufficiently general patch covering both scenarios).
Version-Release number of selected component (if applicable):
6.4.1, seen also on 6.3
How reproducible:
100%
Steps to Reproduce:
1. Have a Satellite with some Hosts (I think the count does not matter)
2. Have a non-admin user with all rights but not Admin checkbox.
3. Run:
time curl -X GET -s -k -u nonadmin:password https://$(hostname -f)/api/v2/hosts/529 > /dev/null
4. Select Admin checkbox for the user.
5. Run the curl command again.
Actual results:
3. shows several times higher time than 5.
Expected results:
3. shows comparable time like 5. Some higher value is understandable, but not several times more.
Additional info:
Updated by The Foreman Bot about 4 years ago
- Status changed from New to Ready For Testing
- Assignee set to Tomer Brisker
- Pull request https://github.com/theforeman/foreman/pull/8101 added
Updated by Tomer Brisker about 4 years ago
- Subject changed from Host detail page load is slow for non-admin user to Host show api endpoint is slow for non-admin user
Updated by Tomer Brisker about 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|1d0e18a15bce13fc8916fcd4e8016796eed1a863.