Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1990864

Summary: Remediation fails with a syntax error
Product: Red Hat Satellite Reporter: Petr Pochop <ppochop>
Component: RH Cloud - Cloud ConnectorAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: ahumbe, aruzicka, pcreech
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python3-receptor-satellite-1.4.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:13:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1995540    
Bug Blocks: 1833033    
Attachments:
Description Flags
Foreman log none

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