Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1745978

Summary: [CPMA]ResouceQuota is generated a wrong apiVersion by cpma utility
Product: OpenShift Container Platform Reporter: Xin jiang <xjiang>
Component: Migration ToolingAssignee: Gilles Dubreuil <gdubreui>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.0CC: chezhang, gdubreui, sregidor, xjiang
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-16 06:37:54 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 Xin jiang 2019-08-27 11:22:13 UTC
Description of problem:

cpma utility generated a worng apiVersion (apiVersion: quota.openshift.io/v1) against ResourceQuota resource.

Version-Release number of selected component (if applicable):
OCP version: 3.09
commit 3c4895c72b533fd403ad6b5dcdb69baf85455204
Severity: medium
Priority: medium

How reproducible:
always

Steps to Reproduce:
1. Apply ResourceQuota to ocp 3 cluster 
$ oc create -f https://raw.githubusercontent.com/XinRedhat/cpma-test/master/quota/quota-demo.yaml 
2. Execute cpma utility to generate CRs
3. Check the generated object quota CR

Actual results:

$ view 100_CPMA-object-quota-test-resource-quota-object-quota-demo.yaml

apiVersion: quota.openshift.io/v1
kind: ResourceQuota
metadata:
  annotations:
    release.openshift.io/create-only: "true"
  creationTimestamp: null
  name: object-quota-demo
  namespace: object-quota-test
...

Expected results:

the apiVersion's value should be 'v1' like below, 
apiVersion: v1
kind: ResourceQuota
metadata:
...

Additional info:

Comment 1 Gilles Dubreuil 2019-08-27 11:49:00 UTC
Hi Xin,

Thanks you for pointing this issue.

I do confirm the apiVersion should be "v1" and not "quota.openshift.io/v1".

Comment 2 Gilles Dubreuil 2019-08-27 11:50:10 UTC
This has been addressed upstream with patch https://github.com/fusor/cpma/pull/376

Comment 3 Gilles Dubreuil 2019-09-05 13:47:30 UTC
Patch has been merged.

Comment 5 Xin jiang 2019-09-06 05:39:23 UTC
Verified with cpma version `commit ef9d17caeeb6640f49919d030bcadf69c694a1c3` and the issue is gone

Comment 6 errata-xmlrpc 2019-10-16 06:37:54 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, 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/RHBA-2019:2922