Description of problem: Now 3.6 router introduce a new port named "router-stats". # oc edit dc/router <--snip--> - name: ROUTER_LISTEN_ADDR value: 0.0.0.0:1935 <--snip--> - containerPort: 1935 hostPort: 1935 name: router-stats protocol: TCP <--snip--> Need an option for oadm router command to allow user specify customized router-stats port just like "--stats-port=1936" option, so that user could easily create an customized router. Version-Release number of selected component (if applicable): openshift v3.6.77 kubernetes v1.6.1+5115d708d7 etcd 3.1.0 How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
the issue here is the router-stats port should not using 'defaultStatsPort-1'. should be 'cfg.StatsPort -1' I guess + env["ROUTER_LISTEN_ADDR"] = fmt.Sprintf("0.0.0.0:%d", defaultStatsPort-1) + env["ROUTER_METRICS_TYPE"] = "haproxy" + ports = append(ports, kapi.ContainerPort{ + Name: "router-stats", + ContainerPort: int32(defaultStatsPort - 1), + Protocol: kapi.ProtocolTCP, + })
Beside the comment 1 as an enhancement, we still need an option to specify customized router-stats port to avoid 'cfg.StatsPort -1' is already occupied by other process.
Keep an eye on https://github.com/openshift/origin/pull/14790 too, we should incorporate how the ports interact into our docs, and perhaps expose ROUTER_LISTEN_ADDR in oadm router.
This was delivered into origin master for 3.6
Thanks clayton! Setting the correct Target Release and moving to MODIFIED to the CI team can process it correctly.
verified this bug on openshift v3.6.126.1 kubernetes v1.6.1+5115d708d7 etcd 3.2.0 1. metrics will using the same port(--stats-ports) , so no need to add a new env for now 2. user can create multi router on same node with different --ports and --stats-port
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