Bug 1884033 - "Ansible report timeout" setting is ignored as report origin is not properly set
Summary: "Ansible report timeout" setting is ignored as report origin is not properly set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible - Configuration Management
Version: 6.6.0
Hardware: x86_64
OS: Linux
medium
unspecified
Target Milestone: 6.8.1
Assignee: Ondřej Pražák
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-30 19:51 UTC by James Jeffers
Modified: 2023-12-15 19:37 UTC (History)
12 users (show)

Fixed In Version: tfm-rubygem-foreman_ansible-5.1.3.1-1,foreman-2.1.2.21-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1800870
Environment:
Last Closed: 2020-11-23 17:13:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 22804 0 Normal Closed Origin for report is not set reliably 2021-02-18 09:08:51 UTC
Github theforeman foreman-ansible-modules pull 870 0 None closed Add reporter to report logs sent by foreman callback 2021-02-18 09:08:50 UTC
Red Hat Bugzilla 1825761 0 medium CLOSED Ansible Role execution reports do not show Ansible Icon 2023-12-15 17:43:20 UTC
Red Hat Knowledge Base (Solution) 4801111 0 None None None 2020-09-30 19:51:18 UTC
Red Hat Product Errata RHBA-2020:5180 0 None None None 2020-11-23 17:14:05 UTC

Comment 1 Bryan Kearney 2020-09-30 20:01:48 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/22804 has been resolved.

Comment 3 Lukas Pramuk 2020-11-12 01:28:03 UTC
FailedQA.

@Satellite 6.8.1 Snap1
tfm-rubygem-foreman_ansible-5.1.3.1-1.el7sat.noarch

when tried to use reproducer described in comment#0:




PLAY RECAP *********************************************************************
dhcp-2-126.example.com : ok=5    changed=1    unreachable=0    failed=0    skipped=3    rescued=0    ignored=0
500 Server Error: Internal Server Error
Exit status: 0

>>> any Ansible REX job, though successful, takes a bit more time now as there is 500 ISE at the end

If the change requires now an updated foreman callback why don't we deliver it also via rpm

Comment 4 Lukas Pramuk 2020-11-12 01:38:29 UTC
Tried to update callback, however 500 ISE persisted

cd /usr/lib/python2.7/site-packages/ansible/plugins/callback/
mv foreman.py foreman.py.orig
wget https://raw.githubusercontent.com/theforeman/foreman-ansible-modules/develop/plugins/callback/foreman.py

Comment 5 Evgeni Golov 2020-11-12 13:38:57 UTC
While this should not affect the 500 error, just downloading the callback from github and placing it into the ansible folder won't work (and is not what customers are supposed to do).

See also https://bugzilla.redhat.com/show_bug.cgi?id=1800870#c18

Comment 6 Evgeni Golov 2020-11-12 14:18:34 UTC
(In reply to Lukas Pramuk from comment #3)

> If the change requires now an updated foreman callback why don't we deliver
> it also via rpm

we do, it's in ansible-collection-redhat-satellite -- but that code is not used by default.

Comment 14 Lukas Pramuk 2020-11-18 15:50:13 UTC
VERIFIED.

@Satellite 6.8.1 Snap3
foreman-2.1.2.21-1.el7sat.noarch
tfm-rubygem-foreman_ansible-5.1.3.1-1.el7sat.noarch
ansible-collection-redhat-satellite-1.3.0-1.el7sat.noarch
ansible-2.9.15-1.el7ae.noarch

by the manual reproducer based on description in comment#0 and comment#6:

1) Update foreman callback by installing ansible-collection-redhat-satellite and changing callback name from "foreman" to "redhat.satellite.foreman"

# satellite-maintain packages install ansible-collection-redhat-satellite
# sed -i 's/^callback_whitelist\s*=.*/callback_whitelist = redhat.satellite.foreman/' /etc/foreman-proxy/ansible.cfg

(expect this setting being overrun by an installer run)

>>> foreman callback is shipped by ansible so Satellite has no control over when it is updated
 
2) Change the Settings > General > Out of sync interval = 5 min , Ansible > Ansible report timeout = 10 mins
3) Assign an Ansible Role to a Host
4) Apply the Role(s) via REX to the Host

5) Refresh the Host details repeatedly to watch "Configuration" status turning from "Active" to "Out of sync"

>>> "Out of sync" status worn after "Out of sync interval" + "Ansible report timeout" time = 15 mins

6) Yet check the origin of the generated report by clicking [Reports] button at the host details page

>>> origin is set to "ansible" (A) icon, instead of "N/A"

>>> was hesitant to verify this BZ as the fix requires callback update which at the moment are manual steps since the foreman callback is currently shipped by ansible and not Satellite but I expect in near future "foreman" callback being replaced by "redhat.satellite.foreman" callback

Comment 18 errata-xmlrpc 2020-11-23 17:13:53 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 (Satellite 6.8.1 Async Bug Fix Update), 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-2020:5180


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