Fix default of router.status.port in jobs/gorouter/spec#66
Fix default of router.status.port in jobs/gorouter/spec#66nota-ja wants to merge 1 commit intocloudfoundry:developfrom
Conversation
The status port value is described as `8080` in the spec, but it is actually `8082` in the source code of gorouter. cf. * https://github.com/cloudfoundry/gorouter/blob/1d44eeb855da9def0af9c32baef2c9be321d4dd6/config/config.go#L31 (the commit 1d44eeb is referred from the HEAD of the latest develop branch of routing-release)
|
Hey nota-ja! Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA. |
|
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/140086223 The labels on this github issue will be updated when the story is started. |
|
@nota-ja : We have a story in backlog to cleanup defaults and as a part of that story we will remove source code defaults and add a sample config to run @shalako @abbyachau opinions ? Thoughts? Regards |
|
If we don't specify I think it is very confusing because the word "default" generally means the value used when we don't specify explicity. However, if you don't think that is confusing, I will respect your opinion. |
|
As @shashwathi mentioned, we do have a story to sync up the "default" config with what we provide in job specs: https://www.pivotaltracker.com/story/show/139315175 We don't see the behavior of listening on port 8082 instead of 8080. We have a few questions:
|
Sounds great!
I found this behavior when I was deploying gorouter and doppler collocated in a same VM. Then I found the following logs from /var/vcap/sys/log/doppler/doppler.stderr.log: Doppler tried to listen the port 8082 for GRPC (this is the default), but the port was already in use. So I ran netstat and found the port 8082 was used by gorouter:
I am using OpenStack as IaaS. The part commented out is in question.
Manually.
This is the generated YAML file (confidential information has been reducted). There's no configuration for I think that is reasonable because of the source code of gorouter.yml.erb, and thus gorouter uses the default port 8082. |
|
The reason this is happening is that if all three of How about removing the status endpoint in Gorouter if the manifest does not explicitly contain all three properties, instead of having a secret unexpected endpoint (which also happens to have no authentication)? |
I have no objection, because I don't yet have any deployment of Cloud Foundry in production. |
|
I would suggest the manifest template require a value for status.password and fail the deployment before rolling the router if a value is not provided. This way the template defaults for status.port and status.password always apply. We must listen on some port for /routes, /health, and /varz. |
That means also to delete "default" value for |
|
I think we'd keep the default port 8080 as that is providing the healthcheck endpoint for production deployments. I'm proposing we add a default user and require a password (with no default). |
|
@shalako So providing default values for One last question just from curiosity. |
|
@nota-ja Regarding your last question, health check port, username and password were considered a tuple so either the manifest values would be picked if all three are present otherwise source code defaults take precedence. We do see your point in wanting to only change a subset of these properties. Do you agree with @shalako in requiring a password but we can set a default user? Would you like to update the PR for these changes? Otherwise, it will be a feature request and a story will be created for it. Thanks, |
|
I agree with all you (the routing-release team) have decided with this issue. |
The status port value is described as
8080in the spec,but it is actually
8082in the source code of gorouter.cf.
(the commit 1d44eeb is referred from the HEAD of the latest develop branch of routing-release)