Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1387658

Summary: Planning of remote execution task on large number of hosts (reported with 500 hosts) takes a lot of time, potentially leading to stuck task
Product: Red Hat Satellite Reporter: Renu Chauhan <rchauhan>
Component: Remote ExecutionAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, bkearney, inecas, jcallaha, mmithaiw, oshtaier
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-foreman_remote_execution-0.3.0.17-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1446728 (view as bug list) Environment:
Last Closed: 2017-06-20 17:21:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
verification screenshot none

Description Renu Chauhan 2016-10-21 13:11:01 UTC
Description of problem: When trying to run a command on all the hosts registered to the Satellite by going to run job and putting * in the search field on the Satellite WebUI, then the task is in pending state for a long time and when Cu go over Tasks and click on the task created he get the following error:

RuntimeError
plan_self has to be invoked before being able to reference the output


Whereas when running the command is run on a single host, then it is executed normally.

Version-Release number of selected component (if applicable):
V 6.2

How reproducible:
Always

Steps to Reproduce:
1.Login on Satellite Server --> Monitor --> Jobs --> Run job
2.In the search query, putting * and in the commands section, a command to be run on all the hosts
3.Where as if in the search section, a few hosts are defined then the command on these hosts is executable well.

Actual results:
I am not able to run a command on all the hosts at a time by entering * in the search section.

Expected results:
We should be able to run a command on all the hosts at a time by putting * in the search query section.

Additional info:It works with few number of hosts by specifying the hosts but fails with * (large number of hosts)

Comment 3 Ivan Necas 2017-01-04 11:45:30 UTC
The original error produced when looking at a task in pending state has been addressed in https://bugzilla.redhat.com/show_bug.cgi?id=1364767 is already shipped as part of errata https://access.redhat.com/errata/RHBA-2016:2940 (sat 6.2.5). Is seems the issue might be with the effectivity of the planning when working with larger number of hosts.

Comment 5 Ivan Necas 2017-01-04 12:01:13 UTC
Created redmine issue http://projects.theforeman.org/issues/17921 from this bug

Comment 6 Satellite Program 2017-01-15 19:05:32 UTC
Upstream bug assigned to sshtein

Comment 7 Satellite Program 2017-01-15 19:05:36 UTC
Upstream bug assigned to sshtein

Comment 11 Ivan Necas 2017-01-26 12:22:52 UTC
There is also https://bugzilla.redhat.com/show_bug.cgi?id=1416542. We need to do more testing/tuning on large scale infrastructure to be able to say, if this is the only change needed, or additional updates are required.

Comment 12 Satellite Program 2017-01-30 23:05:36 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17921 has been resolved.

Comment 14 jcallaha 2017-05-25 15:19:02 UTC
Verified in Satellite 6.2.10 Snap 1

Kicked off a job against 700 hosts. The jobs started executing almost immediately. All jobs completed in under 8 minutes. See attached screenshot.

Comment 15 jcallaha 2017-05-25 15:19:29 UTC
Created attachment 1282303 [details]
verification screenshot

Comment 17 errata-xmlrpc 2017-06-20 17:21:30 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, 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-2017:1553