-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.15
-
Moderate
-
No
-
False
-
Description of problem:
'oc delete istag/$ISTAG --dry-run=server' is unexpectedly deleting the object from the server this is not expected behavior. - Attempted to delete the `istag` resource object by using the `dry-run=server` option. However, the object(image) was actually deleted from the server. - Conversely, when applied the same `dry-run=server` parameter to other resources, they remained intact and were not deleted.
Version-Release number of selected component (if applicable):
OCP 4.15
How reproducible:
Try deleting the `istag` resource using the `--dry-run=server` option with the server strategy.
Steps to Reproduce:
1. Example with resource ImageStreamTag istag ~~~ [quickcluster@upi-0 ~]$ oc delete -n openshift istag/ubi8-openjdk-8:1.11 --dry-run=client imagestreamtag.image.openshift.io "ubi8-openjdk-8:1.11" deleted (dry run) [quickcluster@upi-0 ~]$ oc get istag -n openshift | grep -i ubi8-openjdk-8:1.11 ubi8-openjdk-8:1.11 image-registry.openshift-image-registry.svc:5000/openshift/ubi8-openjdk-8@sha256:022488b1bf697b7dd8c393171a3247bef4ea545a9ab828501e72168f2aac9415 4 weeks ago[ quickcluster@upi-0 ~]$ oc delete -n openshift istag/ubi8-openjdk-8:1.11 --dry-run=server imagestreamtag.image.openshift.io "ubi8-openjdk-8:1.11" deleted (server dry run) [quickcluster@upi-0 ~]$ oc get -n openshift istag | grep -i ubi8-openjdk-8:1.11 ~~~ 2. Example with resource secret ~~~ [quickcluster@upi-0 ~]$ oc delete secrets/deployer-token-jz46t --dry-run=client secret "deployer-token-jz46t" deleted (dry run) [quickcluster@upi-0 ~]$ oc get secret | grep -i deployer-token-jz46t deployer-token-jz46t kubernetes.io/service-account-token 4 28d [quickcluster@upi-0 ~]$ oc delete secrets/deployer-token-jz46t --dry-run=server secret "deployer-token-jz46t" deleted (server dry run) [quickcluster@upi-0 ~]$ oc get secret | grep -i deployer-token-jz46t deployer-token-jz46t kubernetes.io/service-account-token 4 28d ~~~
Actual results:
For `istag` resource, whenever tried to delete the image with option `dry-run=server`. It actually got deleted from the server.
Expected results:
After deleting the `istag` using the `--dry-run=server` option with the server strategy, the `istag` object should still remain on the server.
Additional info: