Bug 1429364
Summary: | clear-route-status.sh can not clean the route status using option 'ALL' when there are more than 2 routes | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | zhaozhanqi <zzhao> |
Component: | Networking | Assignee: | Jacob Tanenbaum <jtanenba> |
Networking sub component: | router | QA Contact: | zhaozhanqi <zzhao> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | medium | ||
Priority: | medium | CC: | aos-bugs, bbennett, eparis, tdawson, yadu |
Version: | 3.5.0 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause:
The command to create a list of routes was incorrect
Consequence:
Route statuses did not get deleted
Fix:
Improved the logic enumerating routes
Result:
Route statuses are correctly cleared
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-10 05:18:47 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
zhaozhanqi
2017-03-06 08:40:53 UTC
Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/edef4d133bcaf5c06668c12252122b2800c2df09 correct the ways that routes are iterated over to be cleared there was an oversight in the way that the clear route status iterated over the routes returned by oc get routes -o jsonpath='{.items[*].metadata.name}' --namespace="${namespace}" 2>/dev/null currently all routes are presented as one string that the server cannot find. Changed that so that the routes are returned into an array and correctly iterated over so that the server is given one route name at a time Bug 1429364 Bug 1429398 Test on latest OCP env V3.5.0.52 with the latest script in https://github.com/openshift/origin/pull/13246 Multiple routes in one project could be cleared normally by the script. but after the clear operation, the time of "exposed on router router1 5 minutes ago" have been changed. Before clear: exposed on router router1 5 minutes ago $ oc describe route route1 -n d1 Name: route1 Namespace: d1 Created: 6 minutes ago Labels: name=service-unsecure Annotations: openshift.io/host.generated=true Requested Host: route1-d1.0313-vn8.qe.rhcloud.com exposed on router router 6 minutes ago exposed on router router1 5 minutes ago <========= $ ./clear-route-status.sh d1 ALL route status for route route1 in namespace d1 cleared route status for route route2 in namespace d1 cleared route status for route route3 in namespace d1 cleared After clear: exposed on router router1 11 seconds ago $ oc describe route route1 -n d1 Name: route1 Namespace: d1 Created: 7 minutes ago Labels: name=service-unsecure Annotations: openshift.io/host.generated=true Requested Host: route1-d1.0313-vn8.qe.rhcloud.com exposed on router router1 11 seconds ago <========= Yan Du this is expected behaviour, the user is clearing all route statuses and the router has to rewrite it. When writing the status the field retains no state. This has been merged into ocp and is in OCP v3.6.27 or newer. Test on latest OCP env, multiple routes in one project could be cleared normally. oc v3.6.27 kubernetes v1.5.2+43a9be4 # ./clear-route-status.sh d1 ALL route status for route route1 in namespace d1 cleared route status for route route2 in namespace d1 cleared route status for route route3 in namespace d1 cleared 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/RHEA-2017:1716 |