Bug 2035393
Summary: | oc set data --dry-run=server makes persistent changes to configmaps and secrets | |||
---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Mridul Markandey <mmarkand> | |
Component: | oc | Assignee: | Maciej Szulik <maszulik> | |
oc sub component: | oc | QA Contact: | zhou ying <yinzhou> | |
Status: | CLOSED ERRATA | Docs Contact: | ||
Severity: | high | |||
Priority: | high | CC: | aos-bugs, mfojtik | |
Version: | 4.7 | |||
Target Milestone: | --- | |||
Target Release: | 4.10.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: |
Cause:
--dry-run flag wasn't properly used for several oc set sub commands.
Consequence:
--dry-run=server was performing updates to resources.
Fix:
Properly wire --dry-run flag such that commands send that information to the server.
Result:
oc set sub commands are working as expected.
|
Story Points: | --- | |
Clone Of: | ||||
: | 2038930 (view as bug list) | Environment: | ||
Last Closed: | 2022-03-11 18:15:11 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2038930 |
Description
Mridul Markandey
2021-12-23 21:25:49 UTC
Hello Team, There is one more update that I would like to share with you. The customer also tested the same on RHCOP v4.8 and the same bug exists there as well, which we have to fix. ~~~ Client Version: 4.8.0-202111041632.p0.git.88e7eba.assembly.stream-88e7eba Server Version: 4.8.24 ~~~ Regards, Mridul Markandey Confirmed with latest oc , the issue can't reproduce now: [root@localhost ~]# oc version --client Client Version: 4.10.0-202201041327.p0.g080f0de.assembly.stream-080f0de [root@localhost ~]# oc get cm cm-testing -o yaml apiVersion: v1 data: name: abc kind: ConfigMap metadata: creationTimestamp: "2022-01-06T02:33:57Z" name: cm-testing namespace: test1 resourceVersion: "77236" uid: 995b4044-4375-4796-83f5-f3bd72bc3331 [root@localhost ~]# oc set data cm/cm-testing --from-literal=name=def --dry-run=client configmap/cm-testing data updated (dry run) [root@localhost ~]# oc get cm cm-testing -o yaml apiVersion: v1 data: name: abc kind: ConfigMap metadata: creationTimestamp: "2022-01-06T02:33:57Z" name: cm-testing namespace: test1 resourceVersion: "77236" uid: 995b4044-4375-4796-83f5-f3bd72bc3331 [root@localhost ~]# oc set data cm/cm-testing --from-literal=name=def --dry-run=server configmap/cm-testing data updated (server dry run) [root@localhost ~]# oc get cm cm-testing -o yaml apiVersion: v1 data: name: abc kind: ConfigMap metadata: creationTimestamp: "2022-01-06T02:33:57Z" name: cm-testing namespace: test1 resourceVersion: "77236" uid: 995b4044-4375-4796-83f5-f3bd72bc3331 [root@localhost ~]# oc create secret generic my-secret --from-literal=key1=supersecret secret/my-secret created [root@localhost ~]# oc get secret my-secret -o yaml apiVersion: v1 data: key1: c3VwZXJzZWNyZXQ= kind: Secret metadata: creationTimestamp: "2022-01-06T02:40:56Z" name: my-secret namespace: test1 resourceVersion: "79412" uid: c9f25d0f-85b0-4b9f-99fe-6f94f61f95f7 type: Opaque [root@localhost ~]# oc set data secret/my-secret --from-literal=key1=testset --dry-run='client' secret/my-secret data updated (dry run) [root@localhost ~]# oc get secret my-secret -o yaml apiVersion: v1 data: key1: c3VwZXJzZWNyZXQ= kind: Secret metadata: creationTimestamp: "2022-01-06T02:40:56Z" name: my-secret namespace: test1 resourceVersion: "79412" uid: c9f25d0f-85b0-4b9f-99fe-6f94f61f95f7 type: Opaque [root@localhost ~]# oc set data secret/my-secret --from-literal=key1=testset --dry-run='server' secret/my-secret data updated (server dry run) [root@localhost ~]# oc get secret my-secret -o yaml apiVersion: v1 data: key1: c3VwZXJzZWNyZXQ= kind: Secret metadata: creationTimestamp: "2022-01-06T02:40:56Z" name: my-secret namespace: test1 resourceVersion: "79412" uid: c9f25d0f-85b0-4b9f-99fe-6f94f61f95f7 type: Opaque Hello Team, As this Bugzilla is going to be resolved for OpenShift version 4.10, So do you have any information if this will be backported to OCPv4.9 and OCP v4.8? Appreciate your quick response. --- Regards, Mridul Markandey (In reply to Mridul Markandey from comment #6) > Hello Team, > > As this Bugzilla is going to be resolved for OpenShift version 4.10, So do > you have any information if this will be backported to OCPv4.9 and OCP v4.8? Yes, backports are on the way, see the list of blocked bugzillas linked to this. |