Bug 1990864 - Remediation fails with a syntax error
Summary: Remediation fails with a syntax error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Cloud Connector
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.10.0
Assignee: Adam Ruzicka
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On: 1995540
Blocks: 1833033
TreeView+ depends on / blocked
 
Reported: 2021-08-06 13:17 UTC by Petr Pochop
Modified: 2021-11-16 14:13 UTC (History)
3 users (show)

Fixed In Version: python3-receptor-satellite-1.4.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:13:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Foreman log (28.68 KB, text/plain)
2021-08-06 13:17 UTC, Petr Pochop
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github project-receptor receptor-satellite pull 15 0 None None None 2021-08-06 13:52:51 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:13:12 UTC

Description Petr Pochop 2021-08-06 13:17:59 UTC
Created attachment 1811487 [details]
Foreman log

Description of problem:
When applying a remediation (after workarounding https://bugzilla.redhat.com/show_bug.cgi?id=1990857 by doing `insights-client --register`), I get the following error:
"""
ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:

JSON: No JSON object could be decoded


Syntax Error while loading YAML.

  but found another document


The error appears to be in '/tmp/d20210806-1217-4l3l6i/project/playbook.yml': line 3, column 1, but may

be elsewhere in the file depending on the exact syntax problem.


The offending line appears to be:


All templates successfully validated

---

^ here

Exit status: 4
"""

Relevant part of foreman log in attachments.


Version-Release number of selected component (if applicable):
Satellite 6.10.0 snap 12.0

How reproducible:
Always

Steps to Reproduce:
1. Configure cloud connector, have a remediable host and inventory uploaded
2. Make sure Satellite is registered (insights-client --register)
3. On CRC, create a remediation
4. Attempt to apply that remediation

Actual results:
Remediation fails with mentioned error

Expected results:
Successful remediation

Comment 4 Petr Pochop 2021-08-24 12:14:36 UTC
Verified on Satellite 6.10.0 snap 14

After working around bug 1995540 with these steps:
- installing rh-python36,
- changing the '#!/usr/bin/python' to '#!/usr/bin/python3' in /usr/bin/insights-client,
- copying the insights_client python library from python2.7 site-packages to python3.6 site-packages
I am able to run a successful remediation without the syntax error, with the playbook log showing just the playbook log.

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