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 2245081 - A Capsule 6.13 has callback plugin set as theforeman.foreman.foreman which affects ansible facts upload
Summary: A Capsule 6.13 has callback plugin set as theforeman.foreman.foreman which af...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.13.4
Hardware: All
OS: All
high
high
Target Milestone: 6.15.0
Assignee: Evgeni Golov
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-10-19 15:18 UTC by Sayan Das
Modified: 2024-07-16 16:01 UTC (History)
4 users (show)

Fixed In Version: satellite-installer-6.15.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-23 17:15:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-20904 0 None None None 2023-10-20 00:22:26 UTC
Red Hat Knowledge Base (Solution) 5506051 0 None None None 2023-10-19 15:26:43 UTC
Red Hat Product Errata RHSA-2024:2010 0 None None None 2024-04-23 17:15:25 UTC

Description Sayan Das 2023-10-19 15:18:56 UTC
Description of problem:

After installing a fresh Capsule 6.13 system and enabling the Ansible feature on it, The callback plugin remains set as "theforeman.foreman.foreman" 

Due to this, even if all ansible role executions would happen fine, foreman_callback will never happen and hence no ansible facts would be uploaded back to satellite via capsule

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

Red Hat Capsule 6.13.4 


How reproducible:

Always 


Steps to Reproduce:
1. Install a Satellite and Capsule 6.13
2. Enable ansible feature on capsule using # satellite-installer --enable-foreman-proxy-plugin-ansible
3. Check the callback plugin mentioned in /etc/foreman-proxy/ansible.env and /etc/foreman-installer/scenarios.d/capsule-answers.yaml of capsule server

Actual results:

# grep theforeman /etc/foreman-installer/scenarios.d/capsule-answers.yaml
  callback: theforeman.foreman.foreman

# cat /etc/foreman-proxy/ansible.env | grep theforeman
export ANSIBLE_CALLBACK_WHITELIST="theforeman.foreman.foreman"
export ANSIBLE_CALLBACKS_ENABLED="theforeman.foreman.foreman"



Expected results:

# grep callback /etc/foreman-installer/scenarios.d/capsule-answers.yaml
  callback: redhat.satellite.foreman

# grep CALLBACK /etc/foreman-proxy/ansible.env
export ANSIBLE_CALLBACK_WHITELIST="redhat.satellite.foreman"
export ANSIBLE_CALLBACKS_ENABLED="redhat.satellite.foreman"



Additional info:


The wrong callback plugin , would still allow the role to run but It will not allow the ansible facts to be uploaded back to satellite as it fails to load.

~~
[WARNING]: Skipping callback plugin 'theforeman.foreman.foreman', unable to
   6:
load
~~

Comment 1 Sayan Das 2023-10-19 15:20:55 UTC
Solution:

Enable the Ansible feature on externa capsules in this way i.e. 

# satellite-installer --enable-foreman-proxy-plugin-ansible  --foreman-proxy-plugin-ansible-callback=redhat.satellite.foreman

Comment 3 Evgeni Golov 2023-10-26 12:39:32 UTC
notes from triage: it's probably because the migration we have (to switch from t.f.f to r.s.f) happens to early, and an easy "fix" would be to hard-code the callback in the scenario overrides (it would take away the possibility to use a different callback, but this is fine in an appliance context that satellite is)

Comment 4 Brad Buckingham 2023-10-30 11:29:29 UTC
Bulk setting Target Milestone = 6.15.0 where sat-6.15.0+ is set.

Comment 5 Lukas Pramuk 2023-12-14 16:18:20 UTC
VERIFIED.

@Satellite 6.15.0 Snap 2.1
satellite-installer-6.15.0.2-1.el8sat.noarch

using an extended reproducer described in comment#0:

1) Have a Satellite with external Capsule integrated

2) Enable Ansible feature on Capsule
# satellite-installer --enable-foreman-proxy-plugin-ansible

3) Check the callback plugin
# grep -rn -e callback: -e _CALLBACK /etc
/etc/foreman-proxy/ansible.env:1:export ANSIBLE_CALLBACK_WHITELIST="redhat.satellite.foreman"
/etc/foreman-proxy/ansible.env:2:export ANSIBLE_CALLBACKS_ENABLED="redhat.satellite.foreman"
/etc/foreman-installer/scenarios.d/capsule-answers.yaml:227:  callback: theforeman.foreman.foreman

>>> override to redhat.satellite.foreman works while installer option --foreman-proxy-plugin-ansible-callback value stopped to make any sense as it is now forcibly overridden

4) Disable Ansible feature on Satellite (to avoid rrobin to distribute tasks to Satellite)
# satellite-installer --no-enable-foreman-proxy-plugin-ansible

5) On Capsule download some roles, import them and assign to Capsule host

6) Play the roles for Capsule host and check the job output
# hammer job-invocation output --id 2 --host <capsule_host>

REPRO:
[WARNING]: Skipping callback plugin 'theforeman.foreman.foreman', unable to load

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************

ok: [<capsule_host>]

vs. 


FIX:
PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************

ok: [<capsule_host>]


7) Check for facts upload
# hammer config-report list --search host=<capsule_host>,applied=1

REPRO:
---|------|-------------|--------|---------|-----------|--------|------------------|---------|--------
ID | HOST | LAST REPORT | ORIGIN | APPLIED | RESTARTED | FAILED | RESTART FAILURES | SKIPPED | PENDING
---|------|-------------|--------|---------|-----------|--------|------------------|---------|--------

vs.


FIX:
---|--------------------------------------------------|---------------------|---------|---------|-----------|--------|------------------|---------|--------
ID | HOST                                             | LAST REPORT         | ORIGIN  | APPLIED | RESTARTED | FAILED | RESTART FAILURES | SKIPPED | PENDING
---|--------------------------------------------------|---------------------|---------|---------|-----------|--------|------------------|---------|--------
2  | <capsule_host>                                   | 2023/12/13 18:07:52 | Ansible | 1       | 0         | 0      | 0                | 8       | 0      
---|--------------------------------------------------|---------------------|---------|---------|-----------|--------|------------------|---------|--------

Comment 6 Lukas Pramuk 2023-12-14 16:31:27 UTC
For Satellite (internal capsule) this is still an issue manifesting after disabling and enabling the Ansible feature BZ#2254576

Comment 9 errata-xmlrpc 2024-04-23 17:15:23 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.15.0 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-2024:2010


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