Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1781671 - While using concurrency_level in remote execution, job progress in WebUI is not being updated properly
Summary: While using concurrency_level in remote execution, job progress in WebUI is n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
urgent
medium
Target Milestone: 6.8.0
Assignee: Adam Ruzicka
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-10 11:30 UTC by Barbora Vassova
Modified: 2024-10-01 16:25 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1832580 1851137 (view as bug list)
Environment:
Last Closed: 2020-10-27 12:59:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
hotfixed tfm-rubygem-foreman-tasks RPM for Satellite 6.6.2 (6.91 MB, application/x-rpm)
2020-04-06 16:39 UTC, wclark
no flags Details
hotfixed tfm-rubygem-foreman_remote_execution RPM for Satellite 6.6.2 (7.08 MB, application/x-rpm)
2020-04-06 16:40 UTC, wclark
no flags Details
UPDATED tfm-rubygem-foreman_remote_execution hotfix RPM (7.08 MB, application/x-rpm)
2020-04-16 14:38 UTC, wclark
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28095 0 Normal Closed Concurrency control doesn't work when batch planning is enabled 2021-02-15 04:36:30 UTC
Foreman Issue Tracker 28616 0 Normal Closed Pass needed option to fix concurrency control with batch triggering 2021-02-15 04:36:30 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 12:59:51 UTC

Description Barbora Vassova 2019-12-10 11:30:25 UTC
Description of problem:
While using concurrency_level in remote execution, job progress in WebUI is not being updated properly and it seems to add a 10 minute delay.  

Version-Release number of selected component (if applicable):
Satellite 6.6

How reproducible:
always

Steps to Reproduce:
1. Create a job on 3 hosts (I used SSH Default template), for example "ls" 
2. Run the job without concurrency_level set up, then with concurrency_level = 1 and also with concurrency_level = 2 
3. Observe the times of jobs being finished.

Actual results:
concurrency_level not set up: ~ 1 minute

Remote action: Run ls on host3	stopped	success	2019-12-10 11:36:19 +0100	2019-12-10 11:36:48 +0100	admin
Remote action: Run ls on host1	stopped	success	2019-12-10 11:36:18 +0100	2019-12-10 11:36:48 +0100	admin
Remote action: Run ls on host2	stopped	success	2019-12-10 11:36:18 +0100	2019-12-10 11:36:48 +0100	admin
Run hosts job: Run ls	stopped	success	2019-12-10 11:36:09 +0100	2019-12-10 11:36:58 +0100	admin

concurrency_level = 1: 20 minutes

Remote action: Run ls on host3	stopped	success	2019-12-10 11:37:19 +0100	2019-12-10 11:57:19 +0100	admin
Remote action: Run ls on host2	stopped	success	2019-12-10 11:37:18 +0100	2019-12-10 11:47:19 +0100	admin
Remote action: Run ls on host1	stopped	success	2019-12-10 11:37:18 +0100	2019-12-10 11:37:48 +0100	admin
Run hosts job: Run ls	stopped	success	2019-12-10 11:37:06 +0100	2019-12-10 11:57:27 +0100	admin

If you look at end times of the jobs, there seems to be a 10 minute delay.

concurrency_level = 2: 10 minutes

Remote action: Run ls on host3	stopped	success	2019-12-10 11:59:21 +0100	2019-12-10 12:09:19 +0100	admin
Remote action: Run ls on host1	stopped	success	2019-12-10 11:59:19 +0100	2019-12-10 11:59:49 +0100	admin
Remote action: Run ls on host2	stopped	success	2019-12-10 11:59:19 +0100	2019-12-10 11:59:49 +0100	admin
Run hosts job: Run ls	stopped	success	2019-12-10 11:59:08 +0100	2019-12-10 12:09:23 +0100	admin
 
Again, 10 minute delay for the third job. 

However, if during the execution you click on the actual jobs (on job invocation page), you can see the results (ls output) even when that particular job is still "planned" or "running". It seems that the actual command is being executed fast as expected - just WebUI information is delayed. Refreshing the page does not help. 

Expected results:
I would expect that if Satellite is able to run all 3 jobs at once in a minute, setting concurrency_level would make it around 3 minutes, in worst case. While the job itself seems to be executed like that, WebUI is not reflecting it.

Comment 3 Adam Ruzicka 2019-12-10 14:35:47 UTC
Connecting upstream issue to this BZ

Comment 5 Adam Ruzicka 2019-12-17 10:07:43 UTC
This won't probably be an easy fix. Until we have a fix ready, the following workaround can be used:

Go to Settings > Foreman Tasks > set 'foreman_tasks_proxy_batch_trigger' to false. Please note this can lead to degraded performance of remote execution in case you have *lots* of hosts.

Comment 10 Bryan Kearney 2020-01-02 15:06:03 UTC
Upstream bug assigned to aruzicka

Comment 11 Bryan Kearney 2020-01-02 15:06:04 UTC
Upstream bug assigned to aruzicka

Comment 13 Bryan Kearney 2020-01-27 15:05:59 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28095 has been resolved.

Comment 15 Adam Ruzicka 2020-02-17 13:31:36 UTC
This also needs https://projects.theforeman.org/issues/28616. Moving back to ASSIGNED until the other patch is merged.

Comment 18 Bryan Kearney 2020-03-10 10:07:31 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28616 has been resolved.

Comment 19 Hao Chang Yu 2020-03-25 11:14:20 UTC
(In reply to Adam Ruzicka from comment #5)
> This won't probably be an easy fix. Until we have a fix ready, the following
> workaround can be used:
> 
> Go to Settings > Foreman Tasks > set 'foreman_tasks_proxy_batch_trigger' to
> false. Please note this can lead to degraded performance of remote execution
> in case you have *lots* of hosts.

I tried this workaround but it is also broken. The jobs failed because ansible jobs are treated as a remote execution jobs. It is because the old API which is using the hardcoded "proxy_action_name" (ForemanRemoteExecutionCore::Actions::RunScript) is used to trigger the remote tasks. The patch for this bugzilla also fixed this issue.

Comment 21 wclark 2020-04-06 16:39:30 UTC
Created attachment 1676643 [details]
hotfixed tfm-rubygem-foreman-tasks RPM for Satellite 6.6.2

Comment 22 wclark 2020-04-06 16:40:17 UTC
Created attachment 1676644 [details]
hotfixed tfm-rubygem-foreman_remote_execution RPM for Satellite 6.6.2

Comment 23 wclark 2020-04-06 16:47:29 UTC
A hotfix for this issue is available for Satellite 6.6.2.

INSTALLATION INSTRUCTIONS:

1. Make a complete backup or snapshot of Satellite server

2. Download the attached hotfix RPMs from this BZ and copy them to Satellite server

3. # foreman-maintain packages unlock

4. # yum install ./tfm-rubygem-foreman_remote_execution-1.8.0.4-2.HOTFIXRHBZ1781671.el7sat.noarch.rpm ./tfm-rubygem-foreman-tasks-0.15.11.1-2.HOTFIXRHBZ1781671.el7sat.noarch.rpm

5. # foreman-maintain packages lock

6. # systemctl restart dynflowd httpd

Comment 24 wclark 2020-04-16 14:38:27 UTC
Created attachment 1679406 [details]
UPDATED tfm-rubygem-foreman_remote_execution hotfix RPM

There was an issue with the previous version of this RPM. Please use the newly uploaded version.

Comment 29 Peter Ondrejka 2020-06-25 09:03:32 UTC
Verified on Sat 6.8 snap 5, the concurrency level setting is accepted with foreman_tasks_proxy_batch_trigger true

Comment 32 errata-xmlrpc 2020-10-27 12:59:35 UTC
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 (Important: Satellite 6.8 release), 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/RHSA-2020:4366

Comment 33 Mike McCune 2020-11-03 17:42:11 UTC
The hotfix for 6.6.2 in this bugzilla is also applicable to 6.6.3 if needed.


Note You need to log in before you can comment on or make changes to this bug.