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 2010863 - Ansible jobs never start
Summary: Ansible jobs never start
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible - Configuration Management
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.10.0
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
: 2011793 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-05 14:06 UTC by Lukáš Hellebrandt
Modified: 2021-11-16 14:14 UTC (History)
7 users (show)

Fixed In Version: python-daemon-2.1.2-7.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:13:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:14:07 UTC

Description Lukáš Hellebrandt 2021-10-05 14:06:33 UTC
Description of problem:
In snap 21.0, running an Ansible role results in the following in /var/log/foreman-proxy/proxy.log:

```
2021-10-05T09:35:46  [E] error while dispatching request to runner ff3d243e-8a1a-4748-ac2c-8c6d920f4430:TypeError no implicit conversion of nil into String:
 /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible_core-4.2.0/lib/foreman_ansible_core/runner/ansible_runner.rb:32:in `basename'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible_core-4.2.0/lib/foreman_ansible_core/runner/ansible_runner.rb:32:in `refresh'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-core-0.3.6/lib/foreman_tasks_core/runner/base.rb:21:in `run_refresh'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-core-0.3.6/lib/foreman_tasks_core/runner/dispatcher.rb:40:in `refresh_runner'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-core-0.3.6/lib/foreman_tasks_core/runner/dispatcher.rb:33:in `start_runner'
```

Consequently, the job never starts and is stuck in "running" state with empty output.

Version-Release number of selected component (if applicable):
Sat 6.10.0 snap 21.0. Regression.

How reproducible:
Deterministic

Steps to Reproduce:
1. Have a Satellite with registered host allowing SSH access to the Satellite
2. In Configure -> Roles, import roles
3. In Host edit dialogue, add some Ansible role
4. In Host edit dialogue, in the top right dropdown menu, select "Run Ansible roles"
5. In Monitoring -> Jobs, open the Job, see it's running, open it for the specific host and see the empty output

Actual results:
The job doesn't run, empty output

Expected results:
Role applied, output shown

Comment 1 Lukáš Hellebrandt 2021-10-05 14:07:40 UTC
Perhaps caused by a fix for bug 1605147

Comment 2 Adam Ruzicka 2021-10-05 17:20:58 UTC
Doesn't seem strictly related to BZ#1605147. I stopped the execution after the directory structure was prepared for ansible-runner and then tried executing ansible-runner manually. Although we should somehow handle the failure more gracefully, let's make the happy path work first.

# ansible-runner run $PWD -p playbook.yml && echo $?
Traceback (most recent call last):
  File "/usr/bin/ansible-runner", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: docutils

Comment 3 Adam Ruzicka 2021-10-05 17:27:54 UTC
Workaround for now is to install python-docutils

Comment 4 Mike McCune 2021-10-05 18:02:14 UTC
see here for more info:

https://bugzilla.redhat.com/show_bug.cgi?id=2010863#c2

Comment 5 Jameer Pathan 2021-10-07 12:08:07 UTC
*** Bug 2011793 has been marked as a duplicate of this bug. ***

Comment 6 Marek Hulan 2021-10-07 13:15:22 UTC
comment 4 probably meant https://bugzilla.redhat.com/show_bug.cgi?id=1998199#c20, we can keep this for verification but effectively it's a dupe of BZ 1998199 IIUC

Comment 7 Mike McCune 2021-10-12 16:36:58 UTC
moving this to MODIFIED in conjunction with the status of 1998199

Comment 8 Mike McCune 2021-10-14 04:41:23 UTC
FYI, tested this with snap 23 and it worked fine

Comment 9 Lukáš Hellebrandt 2021-10-15 14:28:10 UTC
Verified with Sat 6.10.0 snap 23.0.

Tried "Configure Cloud Connector" workflow, it succeeded.
Tried to apply "RedHatInsights.insights-client" role to a host, it succeeded.

Comment 12 errata-xmlrpc 2021-11-16 14:13:58 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.