Bug 1452019 - Need an option for oadm router command to allow user specify customized router-stats port
Summary: Need an option for oadm router command to allow user specify customized route...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Phil Cameron
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-18 07:43 UTC by Johnny Liu
Modified: 2022-08-04 22:20 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-10 05:24:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 09:02:50 UTC

Description Johnny Liu 2017-05-18 07:43:52 UTC
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:

Comment 1 zhaozhanqi 2017-05-18 08:38:25 UTC
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,
 +		})

Comment 2 Johnny Liu 2017-05-19 01:54:48 UTC
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.

Comment 5 Ben Bennett 2017-06-23 17:25:03 UTC
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.

Comment 6 Clayton Coleman 2017-06-25 23:58:19 UTC
This was delivered into origin master for 3.6

Comment 7 Eric Paris 2017-06-26 00:41:44 UTC
Thanks clayton! Setting the correct Target Release and moving to MODIFIED to the CI team can process it correctly.

Comment 9 zhaozhanqi 2017-06-29 09:28:33 UTC
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

Comment 11 errata-xmlrpc 2017-08-10 05:24:06 UTC
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


Note You need to log in before you can comment on or make changes to this bug.