Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre Checks that the port required for MetalK8s deployment or expansion are not in use #3092

Closed
thomasdanan opened this issue Feb 8, 2021 · 4 comments · Fixed by #3163
Closed
Assignees
Labels
complexity:medium Something that requires one or few days to fix priority:high High priority issues, should be worked on ASAP (after urgent issues), not postponed severity:medium Medium impact (usability) on live deployments topic:deployment Bugs in or enhancements to deployment stages topic:operations Operations-related issues

Comments

@thomasdanan
Copy link
Contributor

thomasdanan commented Feb 8, 2021

Component:

'install', 'expansion'

Why this is needed:

When deploying MetalK8s or expanding the cluster, we are assuming that all MetalK8s services will be able to listen on a pre-defined port number. Since we are not in control of how the OS is deployed and configured, some services mail fail to start because the port is already in use.

What should be done:

When installing the bootstrap node or when adding a new node to the cluster we should first check the following ports are not already used.

Bootstrap node ports:

<control plane>:4505: Salt-master publisher
<control plane>:4506: Salt-master request server
<control plane>:4507: Salt API
<control plane>:8080: repository/registry
<control plane>:8443: nginx ingress control plane

Master nodes ports:

<ALL>:6443: apiserver
127.0.0.1:7080: apiserver proxy health check
127.0.0.1:7443: apiserver proxy
<control plane>:10257: kube-controller-manager secure port
<control plane>:10259: kube-scheduler secure port

Etcd nodes ports:

<control plane> AND 127.0.0.1:2379: etcd client traffic
<control plane>:2380: etcd peer traffic
<control plane> AND 127.0.0.1:2381: etcd metrics

All nodes:

127.0.0.1:9099: calico node rediness probe
<ALL>:9100: Node exporter
127.0.0.1:10248: kubelet health check
<ALL>:10249: kube-proxy metrics
<control plane>:10250: kubelet
<ALL>:10256: kube-proxy health check

This list should be exhaustive. As part of this ticket, a simple test should be implemented to make sure this list of port is exhaustive (basically checking all listening ports on a MetalK8s node)

This should be in line with the list of ports we need to document: #264

Implementation proposal (strongly recommended):

Test plan:

@thomasdanan thomasdanan added topic:operations Operations-related issues topic:deployment Bugs in or enhancements to deployment stages priority:high High priority issues, should be worked on ASAP (after urgent issues), not postponed severity:medium Medium impact (usability) on live deployments labels Feb 8, 2021
@NicolasT
Copy link
Contributor

We should check for them to be available, but does it make sense to document sockets bound to localhost only?

@TeddyAndrieux
Copy link
Collaborator

TeddyAndrieux commented Feb 10, 2021

We should check for them to be available, but does it make sense to document sockets bound to localhost only?

To me, we want the full list of ports used so that users can make sure prior to installation that all these ports are free

@TeddyAndrieux
Copy link
Collaborator

TeddyAndrieux commented Feb 10, 2021

But maybe we'll want something else in the documentation (probably some sort of graph) to represent various communications between nodes for firewalls configurations

@NicolasT
Copy link
Contributor

We should check for them to be available, but does it make sense to document sockets bound to localhost only?

To me, we want the full list of ports used so that users can make sure prior to installation that all these ports are free

Agree, never mind my previous comment then 😄

@TeddyAndrieux TeddyAndrieux self-assigned this Feb 15, 2021
@TeddyAndrieux TeddyAndrieux added the complexity:medium Something that requires one or few days to fix label Feb 15, 2021
TeddyAndrieux added a commit that referenced this issue Mar 2, 2021
Add a simple salt function that use `psutil` to list all listening
processes on every ports

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 2, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 2, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 2, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 2, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 2, 2021
Add a simple salt function that use `psutil` to list all listening
processes on every ports

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 2, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 2, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 2, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 2, 2021
Check for all MetalK8s listening processes in `metalk8s_checks.ports`
function

Fixes: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a simple salt function that use `psutil` to list all listening
processes on every ports

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Check for all MetalK8s listening processes in `metalk8s_checks.ports`
function

Fixes: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Check for all MetalK8s listening processes in `metalk8s_checks.ports`
function

Fixes: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Check for all MetalK8s listening processes in `metalk8s_checks.ports`
function

Fixes: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Check for all MetalK8s listening processes in `metalk8s_checks.ports`
function

Fixes: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Check for all MetalK8s listening processes in `metalk8s_checks.ports`
function

Fixes: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a simple salt function that use `psutil` to list all listening
processes on every ports

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Check for all MetalK8s listening processes in `metalk8s_checks.ports`
function

Fixes: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a simple salt function that use `psutil` to list all listening
processes on every ports

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Check for all MetalK8s listening processes in `metalk8s_checks.ports`
function

Fixes: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 3, 2021
Check for all MetalK8s listening processes in `metalk8s_checks.ports`
function

Fixes: #3092
TeddyAndrieux added a commit that referenced this issue Mar 4, 2021
Add a simple salt function that use `psutil` to list all listening
processes on every ports

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 4, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 4, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 4, 2021
Check for all MetalK8s listening processes in `metalk8s_checks.ports`
function

Fixes: #3092
TeddyAndrieux added a commit that referenced this issue Mar 9, 2021
Add a simple salt function that use `psutil` to list all listening
processes on every ports

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 9, 2021
Add a module that use `metalk8s_network.get_listening_processes` to
check listening connection on the local node and check that running
process match what is expected by MetalK8s

Sees: #3092
TeddyAndrieux added a commit that referenced this issue Mar 9, 2021
Add a check in CI to make sure the listening processes list we check in
MetalK8s is exhaustif with everything running on the platform.

NOTE: This check is supposed to run on specific environment that only
have a small list of listening processes other than MetalK8s ones

Sees: #3092
@TeddyAndrieux TeddyAndrieux linked a pull request Mar 9, 2021 that will close this issue
@TeddyAndrieux TeddyAndrieux added this to the MetalK8s 2.8.0 milestone Mar 9, 2021
@bert-e bert-e closed this as completed in fc97119 Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:medium Something that requires one or few days to fix priority:high High priority issues, should be worked on ASAP (after urgent issues), not postponed severity:medium Medium impact (usability) on live deployments topic:deployment Bugs in or enhancements to deployment stages topic:operations Operations-related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants