Bug 1772503 - oc edit clusterresourcequota can not save changes
Summary: oc edit clusterresourcequota can not save changes
Keywords:
Status: CLOSED DUPLICATE of bug 1776100
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.1.z
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.3.0
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-14 14:10 UTC by Wolfgang Kulhanek
Modified: 2019-11-25 19:23 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-25 19:23:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wolfgang Kulhanek 2019-11-14 14:10:34 UTC
Description of problem:
I can no longer use oc edit to change a user's ClusterResourceQuota.

Version-Release number of selected component (if applicable):
Reproduced on 4.1.22 and 4.2.4, does work on 3.11(.43)

How reproducible:
Always

Steps to Reproduce:
1. Create a ClusterResourceQuota:

oc create clusterquota crq-opentlc-mgr \
     --project-annotation-selector openshift.io/requester=opentlc-mgr \
     --hard pods=10 \
     --hard secrets=20

2. Edit the ClusterResourceQuota and change a value - e.g. pods to 11. Save the edited quota.
oc edit clusterresourcequota crq-opentlc-mgr

3. Error:
error: clusterresourcequotas.quota.openshift.io "crq-opentlc-mgr" could not be patched: the body of the request was in an unknown format - accepted media types include: application/json-patch+json, application/merge-patch+json
You can run `oc replace -f /tmp/oc-edit-23u4o.yaml` to try this update again.

Comment 1 Michal Fojtik 2019-11-21 11:26:35 UTC
This is because clusterquota is now CR resource. The 'oc patch --type=merge' should let you change fields.

Maciej: I know we had other resources moved to CRD's, how did we handled oc edit?

Comment 2 Maciej Szulik 2019-11-25 19:23:44 UTC
(In reply to Michal Fojtik from comment #1)
> This is because clusterquota is now CR resource. The 'oc patch --type=merge'
> should let you change fields.
> 
> Maciej: I know we had other resources moved to CRD's, how did we handled oc
> edit?

We need to update the schema in oc, look in the duplicate bug for resolution.

*** This bug has been marked as a duplicate of bug 1776100 ***


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