openconfig / kne

Apache License 2.0
217 stars 65 forks source link

Port numbers need to be swapped after commit of multiple ports on same internal listener #198 #212

Closed stthummuri closed 2 years ago

stthummuri commented 2 years ago

https://github.com/openconfig/kne/pull/198 commit fixed the issue of multiple ports on same internal listener, however the inside and outside port values need to be swapped in the code.

https://github.com/openconfig/kne/blob/35d17355a0ac63b423dfe26db96c5c7342f349b7/topo/topo.go#L586

Outside is configured as 1000 and inside as 50051 services:{ key: 1000 value: { name: "gribi" outside: 1000 inside: 50051 } } services:{ key: 1001 value: { name: "gnmi" outside: 1001 inside: 50051 } }

But deployed service shows as this

services: { key: 1000 value: { name: "gribi" inside: 50051 outside: 50051 inside_ip: "10.96.122.136" outside_ip: "172.18.0.100" node_port: 31488 } } services: { key: 1001 value: { name: "gnmi" inside: 50051 outside: 50051 inside_ip: "10.96.122.136" outside_ip: "172.18.0.100" node_port: 30967 } }

alexmasi commented 2 years ago

Are you seeing this at head? Does https://github.com/openconfig/kne/pull/205 fix this issue (if you've not pulled it yet)?

stthummuri commented 2 years ago

Got the latest head at 08e9c6af64fd9be544cc66b791bd0734ba8af366 and dont see the issue anymore. Port mapping is working correctly now