Bug 1745978 - [CPMA]ResouceQuota is generated a wrong apiVersion by cpma utility
Summary: [CPMA]ResouceQuota is generated a wrong apiVersion by cpma utility
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Migration Tooling
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.2.0
Assignee: Gilles Dubreuil
QA Contact: Xin jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-27 11:22 UTC by Xin jiang
Modified: 2019-10-16 06:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-16 06:37:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:38:05 UTC

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


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