Description of problem: Some users have reported that the CV version page is excessively slow. Querying certain attributes of a task can generate a large number of SQL queries. The queries themselves are very fast, but buildup and teardown can take some time given the # of queries. Version-Release number of selected component (if applicable): 6.2.1, dynflow 0.8.11 How reproducible: every time, given correct initial data set Steps to Reproduce: 1. in terminal #1, foreman-rake console 2. in terminal #2, strace -tt -s999 -e trace=network -f -p <console pid> 2>&1 | grep 'SELECT \* FROM' 3. in terminal #1, run: ForemanTasks::Task.find('<id>').progress Actual results: 10+ seconds to load progress, and many queries Expected results: < 1 sec to load the task, ideally less than 100msec Additional info: example query output: [pid 12404] 13:13:41.079970 sendto(14, "Q\0\0\0\202SELECT * FROM \"dynflow_steps\" WHERE ((\"execution_plan_uuid\" = '4c601f6d-0e4c-4725-8131-cd5fd2686558') AND (\"id\" = 1)) LIMIT 1\0", 131, MSG_NOSIGNAL, NULL, 0) = 131 [pid 12404] 13:13:41.081277 sendto(14, "Q\0\0\0\202SELECT * FROM \"dynflow_steps\" WHERE ((\"execution_plan_uuid\" = '4c601f6d-0e4c-4725-8131-cd5fd2686558') AND (\"id\" = 2)) LIMIT 1\0", 131, MSG_NOSIGNAL, NULL, 0) = 131 [pid 12404] 13:13:41.082095 sendto(14, "Q\0\0\0\202SELECT * FROM \"dynflow_steps\" WHERE ((\"execution_plan_uuid\" = '4c601f6d-0e4c-4725-8131-cd5fd2686558') AND (\"id\" = 3)) LIMIT 1\0", 131, MSG_NOSIGNAL, NULL, 0) = 131 [pid 12404] 13:13:41.082863 sendto(14, "Q\0\0\0\202SELECT * FROM \"dynflow_steps\" WHERE ((\"execution_plan_uuid\" = '4c601f6d-0e4c-4725-8131-cd5fd2686558') AND (\"id\" = 4)) LIMIT 1\0", 131, MSG_NOSIGNAL, NULL, 0) = 131 *snip* [pid 12404] 13:13:54.914686 sendto(14, "Q\0\0\0\206SELECT * FROM \"dynflow_steps\" WHERE ((\"execution_plan_uuid\" = '4c601f6d-0e4c-4725-8131-cd5fd2686558') AND (\"id\" = 16410)) LIMIT 1\0", 135, MSG_NOSIGNAL, NULL, 0) = 135 [pid 12404] 13:13:54.915411 sendto(14, "Q\0\0\0\206SELECT * FROM \"dynflow_steps\" WHERE ((\"execution_plan_uuid\" = '4c601f6d-0e4c-4725-8131-cd5fd2686558') AND (\"id\" = 16411)) LIMIT 1\0", 135, MSG_NOSIGNAL, NULL, 0) = 135 [pid 12404] 13:13:54.916185 sendto(14, "Q\0\0\0\206SELECT * FROM \"dynflow_steps\" WHERE ((\"execution_plan_uuid\" = '4c601f6d-0e4c-4725-8131-cd5fd2686558') AND (\"id\" = 16412)) LIMIT 1\0", 135, MSG_NOSIGNAL, NULL, 0) = 135 [pid 12404] 13:13:54.916917 sendto(14, "Q\0\0\0\206SELECT * FROM \"dynflow_steps\" WHERE ((\"execution_plan_uuid\" = '4c601f6d-0e4c-4725-8131-cd5fd2686558') AND (\"id\" = 16413)) LIMIT 1\0", 135, MSG_NOSIGNAL, NULL, 0) = 135
Created attachment 1197232 [details] enable repo list
After more digging, it also turned out the content view publish process was generating many unnecessary steps, which lead to more more that 100x bigger execution plans, which lead to more time for the task to run, as well as to show details. More detail, as well as proposed fix at http://projects.theforeman.org/issues/16499
The fix for Dynflow loading proposed at https://github.com/Dynflow/dynflow/pull/200 The fix for the Katello issue proposed at https://github.com/Katello/katello/pull/6305
Created attachment 1199470 [details] clean_update_repos.rb The script removes unnecessary steps from tasks, caused by http://projects.theforeman.org/issues/16499, to reduce its size
*** Bug 1291507 has been marked as a duplicate of this bug. ***
Upstream bug component is Content Management
Upstream bug component is Content Views
RHEL7 Hotfix RPMs available for Satellite 6.2.1 only: http://people.redhat.com/~mmccune/1372073/1372073-hotfix.tar Installation instructions: 1) download tar above to your Satellite 6.2.1 RHEL7 server 2) extract and 'rpm -Uvh <rpms in archive>' 3) katello-service restart 4) Download cleanup script from this bug to your Satellite curl https://bugzilla.redhat.com/attachment.cgi?id=1199470 > cleanup_repos.rb 5) foreman-rake console < ~/clean_update_repos.rb 6) proceed with normal operations
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16499 has been resolved.
Verified on 6.2.2
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1993
*** Bug 1260141 has been marked as a duplicate of this bug. ***