Bug 1968406

Summary: [master] Misleading error in case of install-config override bad input
Product: OpenShift Container Platform Reporter: Igal Tsoiref <itsoiref>
Component: assisted-installerAssignee: Daniel Erez <derez>
assisted-installer sub component: Deployment Operator QA Contact: bjacot
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, mfilanov
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: KNI-EDGE-JUKE-4.8 AI-Team-Hive
Fixed In Version: OCP-Metal-v1.0.23.1 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1969470 (view as bug list) Environment:
Last Closed: 2021-10-18 17:32:56 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:    
Bug Blocks: 1969470    

Description Igal Tsoiref 2021-06-07 10:34:52 UTC
Description of problem:
In case we set bad json in install config override, error is not accurate enough.

message: 'The Spec could not be synced due to an input error: invalid character
      ''{'' looking for beginning of object key string'

It should explain that error is in install-config annotation 

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Ronnie Lazar 2021-06-07 12:41:00 UTC
*** Bug 1968405 has been marked as a duplicate of this bug. ***

Comment 2 Michael Filanov 2021-06-08 13:35:22 UTC
we call a specific api to update the install config so in this case we can probably wrap the error and reply a more detailed error for the user, for example if the error is 4xx then we will wrap it. 
Need to check how to handle updateState without breaking the internal logic that check the error type. maybe add optional wrap message to the function.

Comment 5 errata-xmlrpc 2021-10-18 17:32:56 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: OpenShift Container Platform 4.9.0 bug fix and security 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/RHSA-2021:3759