Bug 1934110 - Foreman callback is always used
Summary: Foreman callback is always used
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible - Configuration Management
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.10.0
Assignee: Adam Ruzicka
QA Contact: Danny Synk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-02 14:24 UTC by Adam Ruzicka
Modified: 2021-11-16 14:10 UTC (History)
1 user (show)

Fixed In Version: ansible-collection-redhat-satellite-2.1.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:10:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 32020 0 Normal New Foreman callback is run always not just for roles 2021-03-05 12:30:20 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:10:21 UTC

Internal Links: 1737104

Description Adam Ruzicka 2021-03-02 14:24:20 UTC
Description of problem:
When satellite used ansible-playbook, it disabled the callback plugin for all runs, except when roles were being applied. 

Version-Release number of selected component (if applicable):
tfm-rubygem-foreman_ansible-6.1.1-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Bump ansible verbosity to -vvvv in Administer > Settings > Ansible > Default verbosity level
2. Run for example ls -la / using ansible
3. Check the output

Actual results:
Line "Loading callback plugin foreman of type notification, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/foreman.py" appears in the output, run is slow.


Expected results:
The callback plugin is not loaded, no such line in output, faster run.


Additional info:
The current callback plugin is not exactly ideal performance wise and might cause severe performance degradation, depending on number of hosts and the playbook being run.

Comment 1 Ondřej Ezr 2021-03-05 12:30:19 UTC
Created redmine issue https://projects.theforeman.org/issues/32020 from this bug

Comment 2 Bryan Kearney 2021-03-05 16:03:26 UTC
Upstream bug assigned to aruzicka

Comment 3 Bryan Kearney 2021-03-05 16:03:29 UTC
Upstream bug assigned to aruzicka

Comment 5 Danny Synk 2021-06-22 17:29:54 UTC
Steps to Test:

1. Register a content host to Satellite and configure it for remote execution using the Global Registration Template.
2. In the Satellite webUI, increase the Ansible verbosity to Level 4 using the Administer > Settings > Ansible > Default verbosity level setting.
3. In the Satellit webUI, navigate to Hosts > All Hosts > [hostname] and click the "Schedule remote job" button.
4. On the job invocation page, set the job category to "Ansible Commands" and enter "ls -la" in the "command" field.
5. Click the "Submit" button.

Expected Results:

The foreman notification callback is not loaded, and the job completes faster than a Satellite that does use this callback.

Actual Results:

The foreman notification callback is not loaded, and the job completes faster than a Satellite that does use this callback.

On Satellite 6.10.0, snap 5, the job completes in 11 seconds, and the output contains the following line:

    output: "[WARNING]: Skipping callback plugin 'theforeman.foreman.foreman', unable
      to\r\nload\n"

On Satellite 6.9.3, snap 3, the same job completes in 31 seconds, and the output contains the following line:

    output: 'Loading callback plugin foreman of type notification, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/foreman.pyc

Verified on Satellite 6.10, snap 5 (tfm-rubygem-foreman_ansible-6.3.0-1.el7sat.noarch).

Comment 8 errata-xmlrpc 2021-11-16 14:10:12 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 (Moderate: Satellite 6.10 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-2021:4702


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