Bug 1943543
Summary: | DeploymentConfig Rollback doesn't reset params correctly | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Yadan Pei <yapei> |
Component: | Management Console | Assignee: | Jeff Phillips <jephilli> |
Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> |
Severity: | urgent | Docs Contact: | |
Priority: | high | ||
Version: | 4.8 | CC: | aos-bugs, jephilli, jhadvig, jokerman, schituku, yanpzhan, yapei |
Target Milestone: | --- | ||
Target Release: | 4.8.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | No Doc Update | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-07-27 22:56:00 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
Yadan Pei
2021-03-26 11:55:01 UTC
I assume if we didn't choose any additional options in Rollback modal, default rollback behavior should be applied 1. Create example DC from console $ oc get rc -n yapeiconsole NAME DESIRED CURRENT READY AGE example-1 3 3 3 30s $ oc get rc example-1 -o json | jq '.spec.template.spec.containers[0]' { "image": "image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest", "imagePullPolicy": "Always", "name": "httpd", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File" } => add testkey1 & testvalue1 environment & scale down to 1,, this will trigger a new deployment $ oc get rc NAME DESIRED CURRENT READY AGE example-1 0 0 0 2m36s example-2 3 3 3 28s $ oc get rc example-2 -o json | jq '.spec.template.spec.containers[0]' { "env": [ { "name": "testkey1", "value": "testkey2" } ], "image": "image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest", "imagePullPolicy": "Always", "name": "httpd", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File" } => rollback to example-1 from console $ oc get rc NAME DESIRED CURRENT READY AGE example-1 0 0 0 6m9s example-2 0 0 0 4m1s example-3 1 1 1 80s $ oc get rc example-3 -o json | jq '.spec.template.spec.containers[0]' // all configurations are rollbacked to be the same with example-1 { "image": "image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest", "imagePullPolicy": "Always", "name": "httpd", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File" } ==> rollback to example-2 from console $ oc get rc example-4 -o json | jq '.spec.template.spec.containers[0]' // all configurations are rollbacked to be the same with example-2 { "env": [ { "name": "testkey1", "value": "testkey2" } ], "image": "image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest", "imagePullPolicy": "Always", "name": "httpd", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File" } ==> update DC spec.selector to 2 and spec.selector to httpd-test, this will trigger a new deployment $ oc get rc NAME DESIRED CURRENT READY AGE example-1 0 0 0 10m example-2 0 0 0 8m11s example-3 0 0 0 5m30s example-4 0 0 0 3m27s example-5 2 2 2 30s $ oc get rc example-5 -o json | jq '.spec' { "replicas": 2, "selector": { "app": "httpd-test", "deployment": "example-5", "deploymentconfig": "example" .... }, "spec": { "containers": [ { "env": [ { "name": "testkey1", "value": "testkey2" } ], "image": "image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest", "imagePullPolicy": "Always", "name": "httpd", .... } } } ===> rollback to example-1 and choose 'Replica count and selector', this will trigger a new deployment // all configurations are rollbacked to be the same with example-1, especially replicas and selector $ oc get rc NAME DESIRED CURRENT READY AGE example-1 0 0 0 14m example-2 0 0 0 12m example-3 0 0 0 9m36s example-4 0 0 0 7m33s example-5 0 0 0 4m36s example-6 3 3 3 21s $ oc get rc example-6 -o json | jq '.spec.replicas' 3 $ oc get rc example-6 -o json | jq '.spec.selector' { "app": "httpd", "deployment": "example-6", "deploymentconfig": "example" } $ oc get rc example-6 -o json | jq '.spec.template.spec.containers[0]' { "image": "image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest", "imagePullPolicy": "Always", "name": "httpd", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File" } This has been tested against the open PR and works fine 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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/RHSA-2021:2438 |