Bug 2055696

Summary: StorageProvider: fix onboardingTicket unmarshalling
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Santosh Pillai <sapillai>
Component: ocs-operatorAssignee: Santosh Pillai <sapillai>
Status: CLOSED CURRENTRELEASE QA Contact: suchita <sgatfane>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.10CC: madam, muagarwa, nberry, ocs-bugs, odf-bz-bot, rperiyas, sgatfane, sostapov
Target Milestone: ---   
Target Release: ODF 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.10.0-163 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-21 09:12:46 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:

Description Santosh Pillai 2022-02-17 14:32:54 UTC
Description of problem (please be detailed as possible and provide log
snippests):

OnboardingTicket expiryData is int64 which can't be unmarshalled from
string value. 

Error:
onboarding ticket is not valid. failed to unmarshal onboarding ticket message. json: cannot unmarshal string into Go struct field onboardingTicket.expirationDate of type int64"


Version of all relevant components (if applicable):


Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?


Is there any workaround available to the best of your knowledge?


Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?


Can this issue reproducible?


Can this issue reproduce from the UI?


If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1. Create Storage Consumer cluster with valid token
2. Observe the reconciliation of the controller.
3.


Actual results: Onboarding call fails due to error in unmarshalling of the onboardingTicket 


Expected results: No error should be there.


Additional info:

Comment 5 suchita 2022-03-02 03:41:08 UTC
Verified it during deployment of consumer

Consumer onboarded successfully with the generated token. 

No error for onboarding Ticket. 
For onboarding multiple consumers on the same provider inconsistently `Token is already used` error was found. This BZ has been tracked in https://bugzilla.redhat.com/show_bug.cgi?id=2056634 .
Hence marking this BZ as Verified. 

Tested on version 

$ oc get csv
NAME                                               DISPLAY                           VERSION           REPLACES                                           PHASE
configure-alertmanager-operator.v0.1.408-a047eaa   configure-alertmanager-operator   0.1.408-a047eaa   configure-alertmanager-operator.v0.1.406-7952da9   Succeeded
mcg-operator.v4.10.0                               NooBaa Operator                   4.10.0                                                               Succeeded
ocs-operator.v4.10.0                               OpenShift Container Storage       4.10.0                                                               Succeeded
odf-operator.v4.10.0                               OpenShift Data Foundation         4.10.0                                                               Succeeded
route-monitor-operator.v0.1.402-706964f            Route Monitor Operator            0.1.402-706964f   route-monitor-operator.v0.1.399-91f142a            Succeeded

oc get csv -n openshift-storage -o json ocs-operator.v4.10.0 | jq '.metadata.labels["full_version"]'
"4.10.0-171"