Hide Forgot
Created attachment 1151780 [details] Update-route-successfully Description of problem: When edit an existing route on web console, there is reference info saying "Public hostname for the route. If not specified, a hostname is generated.", after click "Save" without specifying "Hostname", it prompts info that the route is updated successfully. But in fact Hostname is not set automatically. And if create a new route without specifying Hostname, there will be a Hostname automatically set for the route. Version-Release number of selected component (if applicable): openshift v1.3.0-alpha.0-167-g4589987 kubernetes v1.3.0-alpha.1-331-g0522e63 etcd 2.3.0 How reproducible: Always Steps to Reproduce: 1.Create an app, it will create a route automatically. $oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json 2.Edit the route on web console without specifying Hostname, and click "Save". 3. Actual results: 2.It shows info that route was successfully updated, but in fact Hostname was not set, on the route page, could see "<unknown host> rejected by router "router"". Refer to attachment. Expected results: 2.Hostname should be set automatically. Additional info:
Created attachment 1151781 [details] Warning-info
Paul, what should happen when you edit a route and remove hostname?
Ram, going through the history of this it looks like it was always only in the REST create (and then moved to the create strategy when REST was refactored). That seems a little odd. This route would be dropped by the router since it is not in a valid format unless the router was configured with the DNS pattern override in which case a blank host would be fine. Should we allocate a host name on updates in PrepareForUpdate? Does it make sense to have the host name be immutable? Probably not although I do wonder how this would work in the future with sharding strategies that work based on route attributes.
@Paul, Yeah that is a bug - we should do it for both PrepareFor{Create,Update} if Spec.Host not set. Though that said, there's an overlap between the hostname generator and the router subdomain config parameter.
https://github.com/openshift/origin/pull/8677
Paul, thanks! Is there additional work beyond that PR that needs to happen for this, or can we close this bug?
ready for testing
Checked on devenv-rhel7_4374. When update hostname of the route, it will prompt error info to indicate that the field is immutable. Since the field is immutable, why not disable the input box for hostname, and remove this info:"Public hostname for the route. If not specified, a hostname is generated."? Customers may feel confused by it. Assign it back first, if dev think this is acceptable and won't update, pls move to ON_QA, then QE will verify it.
Last minute update :). This behavior was just changed yesterday to avoid stealing routes and the field is now immutable. I think your test was valid. https://github.com/openshift/origin/pull/9325
Checked on devenv-rhel7_4409, routes can be edited and hostname is immutable and can not be updated now. Move the bug to Verified.