Bug 1956190

Summary: Invalid json created and reported to cloud
Product: Red Hat Satellite Reporter: Sanket Jagtap <sjagtap>
Component: RH Cloud - InventoryAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: achadha, aruzicka, fgrosjea, mmccune, wpinheir
Target Milestone: 6.10.0Keywords: SubscriptionWatch, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_rh_cloud-3.0.21 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1973332 (view as bug list) Environment:
Last Closed: 2021-11-16 14:10:50 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:
Attachments:
Description Flags
tfm-rubygem-foreman_rh_cloud-3.0.18.1-2.HOTFIXRHBZ1956190.el7sat.noarch.rpm none

Description Sanket Jagtap 2021-05-03 07:39:42 UTC
Description of problem:
In the production logs, there is a issue that we are observing, related a invalid json been submitted to yupana from various accounts.

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

How reproducible:
Always

Steps to Reproduce:
Looks like the value for some key field is not propogated to the report and a invalid json is created. this is how the json looks, 

{"namespace": "satellite","key": "lifecycle_environment",},
{"namespace": "satellite","key": "content_view",}, 
{"namespace": "satellite","key": "satellite_instance_id","value": "XXXXXXXXXXXXXXXXXXXXX4"}, 
{"namespace": "satellite","key": "organization_id","value": "1"}]},


Actual results:
Invalid json is reported and rejected.

Expected results:
Invalid json , should not be created, or (verified/linted) before being uploaded to cloud.

Additional info:

Comment 3 Mike McCune 2021-06-14 21:43:32 UTC
*** Satellite 6.9.2 and 6.9.2.1 Hotfix Available ***

1) Download tfm-rubygem-foreman_rh_cloud-3.0.18.1-2.HOTFIXRHBZ1956190.el7sat.noarch.rpm from this bugzilla to your Satellite


2) stop services:

satellite-maintain service stop

3) Install:

rpm -Uvh tfm-rubygem-foreman_rh_cloud-3.0.18.1-2.HOTFIXRHBZ1956190.el7sat.noarch.rpm

4) restart:

satellite-maintain service start

5) resume operations

Comment 4 Mike McCune 2021-06-14 21:44:28 UTC
Created attachment 1791085 [details]
tfm-rubygem-foreman_rh_cloud-3.0.18.1-2.HOTFIXRHBZ1956190.el7sat.noarch.rpm

Comment 5 Jameer Pathan 2021-09-09 09:37:52 UTC
Verified 

Verified with:
- Satellite 6.10.0 snap 15
- tfm-rubygem-foreman_rh_cloud-4.0.26-1.el7sat.noarch.rpm

Test steps:
- Generated report from customer db 6.10.0 snap 15 satellite.
- Verified generated archive with Subscription Watch QE team.
OR
- Have hosts registered with satellite. 
- Generate inventory reports.

Observations:
- Valid json file is created.

Comment 8 errata-xmlrpc 2021-11-16 14:10:50 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