Under certain conditions check_rules is very sluggish
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Cloud Archive |
Fix Released
|
Undecided
|
Unassigned | ||
Ocata |
Fix Released
|
Medium
|
Unassigned | ||
Queens |
Fix Released
|
Medium
|
Unassigned | ||
oslo.policy |
Fix Released
|
Undecided
|
Ben Nemec | ||
python-oslo.policy (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned |
Bug Description
In Horizon we observe in certain projects function check_rules() taking up to 10 seconds while in the others maximum 2 seconds.
In order to remedy this, we would like to have check_rules function executed only if oslo.policy is configured to check the syntax, i.e. to introduce a config parameter defaulting to True but with a possibility to disable it. In that case (operator setting it to False) there wouldn't be any checks from oslo.policy side if the syntax of provided JSON file is correct.
Current behavior shouldn't be changed, i.e. syntax checks should be opt-out.
=======
SRU for UCA Queens
[Impact]
In Horizon, Admin->
This fix optimizes the policy logic to avoid any redundant policy checks and further enhancing API response times.
[Test Case]
Create 240 networks and observe page load time before and after fix
1. Collect information before fix
1a. Increase network and subnet quota for the admin project
openstack quota set --networks -1 <project id>
openstack quota set --subnets -1 <project id>
1b. Create 240 networks using openstack cli
for i in {1..240}; do openstack network create test$i; openstack subnet create --subnet-range 10.1.$i.0/24 --network test$i test$i; done
1c. Login to dashboard as admin user in a preferred browser
1d. Open Developer options --> Network tab. This should show all the outgoing network traffic information from browser.
1e. Open Admin->
1f. Note down the time taken for /admin/networks in Network tab of browser
1g. Repeat 1c 3-5 times and take average time taken for /admin/networks
2. Install the package with the fixed code and restart apache service
3. Collect information after fix
3a. Repeat steps 1c-1g
3b.You should observe an improvement in time reduction of /admin/networks after the fix.
[Regression Potential]
Given the following indicators, the regression potential is negligible
a. Upstream CI passed with all tempest test cases passed. Indicates no break in functionality.
b. The fix is available on releases Rocky, Stein, Train since a year ago and no problems reported with this functionality.
There will be downtime of milliseconds during restart of apache services.
Changed in oslo.policy: | |
assignee: | Mateusz Kowalski (makowals) → Ben Nemec (bnemec) |
description: | updated |
tags: | added: sts-sru-needed |
no longer affects: | cloud-archive/mitaka |
no longer affects: | python-oslo.policy (Ubuntu Xenial) |
Fix proposed to branch: master /review. openstack. org/511426
Review: https:/