From c8a87bf2fd65212d5e0a00db0435dea521b8b97e Mon Sep 17 00:00:00 2001 From: Alexey Perevalov Date: Mon, 20 May 2019 18:11:42 +0300 Subject: [PATCH] Use non local port for CNI Daemon This port 50036 can be already used in the system, due to it's in range for egress ports. Closes-Bug: 1829188 Change-Id: Ieee291893ca342867eb408d65402a8576327ac6d Signed-off-by: Alexey Perevalov --- doc/source/devref/kuryr_kubernetes_design.rst | 2 +- kuryr_kubernetes/config.py | 2 +- .../change-cni-daemon-default-port-e968a83fa1bf30b5.yaml | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/change-cni-daemon-default-port-e968a83fa1bf30b5.yaml diff --git a/doc/source/devref/kuryr_kubernetes_design.rst b/doc/source/devref/kuryr_kubernetes_design.rst index 89388013d..95354ebaa 100644 --- a/doc/source/devref/kuryr_kubernetes_design.rst +++ b/doc/source/devref/kuryr_kubernetes_design.rst @@ -231,7 +231,7 @@ Communication ~~~~~~~~~~~~~ CNI Daemon Server is starting an HTTP server on a local network socket -(``127.0.0.1:50036`` by default). Currently server is listening for 2 API +(``127.0.0.1:5036`` by default). Currently server is listening for 2 API calls. Both calls load the ``CNIParameters`` from the body of the call (it is expected to be JSON). diff --git a/kuryr_kubernetes/config.py b/kuryr_kubernetes/config.py index 00d0c931e..c56d2f6ee 100644 --- a/kuryr_kubernetes/config.py +++ b/kuryr_kubernetes/config.py @@ -34,7 +34,7 @@ daemon_opts = [ cfg.StrOpt('bind_address', help=_('Bind address for CNI daemon HTTP server. It is ' 'recommened to allow only local connections.'), - default='127.0.0.1:50036'), + default='127.0.0.1:5036'), cfg.IntOpt('worker_num', help=_('Maximum number of processes that will be spawned to ' 'process requests from CNI driver.'), diff --git a/releasenotes/notes/change-cni-daemon-default-port-e968a83fa1bf30b5.yaml b/releasenotes/notes/change-cni-daemon-default-port-e968a83fa1bf30b5.yaml new file mode 100644 index 000000000..7dff0e397 --- /dev/null +++ b/releasenotes/notes/change-cni-daemon-default-port-e968a83fa1bf30b5.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + kuryr-daemon used to listen on port 50036, but that's a port from local + range (on Ubuntu and RHEL default range is 32768-60999). This means that + there might have been a port conflict ("address already in use"). To avoid + that the default value of ``[cni_daemon]bind_address`` option was changed + to ``127.0.0.1:5036``.