Description of problem: Create a route and try to update the host for route by oc edit route, but the change doesn't take effect after save and quit the edit, and no warning information show up Version-Release number of selected component (if applicable): oc v3.2.0.3 kubernetes v1.2.0-origin-41-g91d3e75 How reproducible: Always Steps to Reproduce: 1. Create pod/service/route # oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/routing/nginx-pod.json # oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/routing/unsecure/service_unsecure.json # oc create route edge myroute --service=hello-nginx --hostname=www.edge.com # oc get route NAME HOST/PORT PATH SERVICE TERMINATION LABELS myroute www.edge.com hello-nginx:http edge name=hello-nginx 2. Try to update the host for route, eg change www.edge.com to www.edge1.com # oc edit route myroute 3. Check the route Actual results: The change for route doesn't take effect step3: The route is still same # oc get route NAME HOST/PORT PATH SERVICE TERMINATION LABELS myroute www.edge.com hello-nginx:http edge name=hello-nginx Expected results: The host could be updated successfully. If the host is not allowed to change, at least some friendly warnings show up Additional info: The route after updating # oc get route -o yaml apiVersion: v1 items: - apiVersion: v1 kind: Route metadata: creationTimestamp: 2016-03-15T10:04:57Z labels: name: hello-nginx name: myroute namespace: d2 resourceVersion: "2493" selfLink: /oapi/v1/namespaces/d2/routes/myroute uid: 5f3cc539-ea95-11e5-bb44-fa163ec44b15 spec: host: www.edge1.com port: targetPort: http tls: termination: edge to: kind: Service name: hello-nginx status: ingress: - conditions: - lastTransitionTime: 2016-03-15T10:04:58Z status: "True" type: Admitted host: www.edge.com routerName: router kind: List metadata: {}
I can reproduce. The edit to the route is successful, and the router picks up the edit and reconfigures itself for the new hostname. However, 'oc get route' prefers the host of the ingress status which is not being updated when the host of a route changes.
I have a partial diagnosis. When the status plugin encounters a route for the first time it writes the update time to its timestamp cache with nanosecond precision, but the ingress timestamp is not stored with nanosecond precision. When the host for the route is subsequently updated, the status plugin finds the most recent ingress timestamp to not match its cached timestamp and, assuming this to mean that another route has updated the ingress status, does not update the ingress status for the route with the updated host. Bouncing the router pod with 'oc dc router --latest' clears the router's timestamp cache and all subsequent router updates are correctly handled by the status plugin. I'm assuming the fix is truncating the nanosecond portion of timestamps before they are stored in the status plugin's timestamp cache, but need to confirm this.
The origin PR has merged.
This has been merged into OSE and is in release v3.2.0.8
Test on latest ose env openshift v3.2.0.8 kubernetes v1.2.0-36-g4a3f9c5 etcd 2.2.5 Issue have been fixed, route could be updated successfully, move bug to verified
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/RHSA-2016:1064