Bug 2090317 - [MTC] mig-operator failed to create a DPA CR due to null values are passed instead of int [OADP-BL]
Summary: [MTC] mig-operator failed to create a DPA CR due to null values are passed in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: Operator
Version: 1.7.2
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 1.7.2
Assignee: Jason Montleon
QA Contact: Prasad Joshi
Richard Hoch
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-25 13:57 UTC by Prasad Joshi
Modified: 2022-07-01 09:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-01 09:53:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OADP-535 0 None None None 2022-05-25 17:32:09 UTC
Red Hat Product Errata RHSA-2022:5483 0 None None None 2022-07-01 09:53:31 UTC

Description Prasad Joshi 2022-05-25 13:57:57 UTC
Description of problem: mig-operator is failing to create a DPA CR in OCP 4.6 cluster. See below logs for more details.

fatal: [localhost]: FAILED! => {"changed": false, "error": 422, "msg": "Failed to create object: b'{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"DataProtectionApplication.oadp.openshift.io \\\\\"velero\\\\\" is invalid: [spec.configuration.velero.podConfig.resourceAllocations.requests.memory: Invalid value: \\\\\"null\\\\\": spec.configuration.velero.podConfig.resourceAllocations.requests.memory in body must be of type integer,string: \\\\\"null\\\\\", spec.configuration.velero.podConfig.resourceAllocations.limits: Invalid value: \\\\\"null\\\\\": spec.configuration.velero.podConfig.resourceAllocations.limits in body must be of type object: \\\\\"null\\\\\", spec.configuration.restic.podConfig.resourceAllocations.limits: Invalid value: \\\\\"null\\\\\": spec.configuration.restic.podConfig.resourceAllocations.limits in body must be of type object: \\\\\"null\\\\\", spec.configuration.restic.podConfig.resourceAllocations.requests.memory: Invalid value: \\\\\"null\\\\\": spec.configuration.restic.podConfig.resourceAllocations.requests.memory in body must be of type integer,string: \\\\\"null\\\\\"]\",\"reason\":\"Invalid\",\"details\":{\"name\":\"velero\",\"group\":\"oadp.openshift.io\",\"kind\":\"DataProtectionApplication\",\"causes\":[{\"reason\":\"FieldValueInvalid\",\"message\":\"Invalid value: \\\\\"null\\\\\": spec.configuration.velero.podConfig.resourceAllocations.requests.memory in body must be of type integer,string: \\\\\"null\\\\\"\",\"field\":\"spec.configuration.velero.podConfig.resourceAllocations.requests.memory\"},{\"reason\":\"FieldValueInvalid\",\"message\":\"Invalid value: \\\\\"null\\\\\": spec.configuration.velero.podConfig.resourceAllocations.limits in body must be of type object: \\\\\"null\\\\\"\",\"field\":\"spec.configuration.velero.podConfig.resourceAllocations.limits\"},{\"reason\":\"FieldValueInvalid\",\"message\":\"Invalid value: \\\\\"null\\\\\": spec.configuration.restic.podConfig.resourceAllocations.limits in body must be of type object: \\\\\"null\\\\\"\",\"field\":\"spec.configuration.restic.podConfig.resourceAllocations.limits\"},{\"reason\":\"FieldValueInvalid\",\"message\":\"Invalid value: \\\\\"null\\\\\": spec.configuration.restic.podConfig.resourceAllocations.requests.memory in body must be of type integer,string: \\\\\"null\\\\\"\",\"field\":\"spec.configuration.restic.podConfig.resourceAllocations.requests.memory\"}]},\"code\":422}\\n'", "reason": "Unprocessable Entity", "status": 422}


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

How reproducible: Always 


Steps to Reproduce:
1. Install MTC operator


Actual results: mig-operator is failing to create a DPA CR due to null value being passed instead of int.


Expected results: DPA resource should get created successfully.


Additional info:

Comment 1 Erik Nelson 2022-05-25 14:16:00 UTC
Jason was able to repair this in OADP by adding "nullabe: true" to the fields in the CRD. We're unsure why this works on 4.10 compared to 4.6, but this would ultimately be an OADP change to fix. Discussing with Dylan about the right way to approach this. It's possible this is something added to OADP 1.0.3.

Comment 2 Pranav Gaikwad 2022-05-25 17:32:10 UTC
This issue actually requires a fix in OADP CRDs. This is a tracking BZ for the OADP bug. The JIRA is linked to the BZ.

Comment 6 Prasad Joshi 2022-06-20 10:42:24 UTC
Verified with MTC 1.7.2 (Prestage)

metadata_nvr: openshift-migration-operator-metadata-container-v1.7.2-15

No issue found in operator pod logs. Also verified on OCP 4.9

$ oc version
Client Version: 4.7.19
Server Version: 4.6.0-0.nightly-2022-06-17-174132
Kubernetes Version: v1.19.16+8203b20

$ oc logs -n openshift-migration migration-operator-6ddb7575c-stqqh

PLAY RECAP *********************************************************************
localhost                  : ok=35   changed=1    unreachable=0    failed=0    skipped=39   rescued=0    ignored=0   


Moving to Verified status.

Comment 12 errata-xmlrpc 2022-07-01 09:53:23 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: Migration Toolkit for Containers (MTC) 1.7.2 security and bug fix 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-2022:5483


Note You need to log in before you can comment on or make changes to this bug.