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

Check for dummy kernel module #7307

Closed
lentzi90 opened this issue Feb 22, 2021 · 2 comments · Fixed by #7348
Closed

Check for dummy kernel module #7307

lentzi90 opened this issue Feb 22, 2021 · 2 comments · Fixed by #7348
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@lentzi90
Copy link
Contributor

What would you like to be added:
I would like to add a modprobe dummy test (or something similar) to kubernetes/preinstall.

Why is this needed:
TL;DR: Kubespray seem to run just fine without the dummy module, but the network in the cluster does not work well. Therefore I would like to quickly detect this issue while running Kubespray and alert the user.

Longer version:
I recently tried running Kubespray to install Kubernetes on some VMs based on ubuntu minimal (not completely sure it was exactly this but the template was named in this way). Kubespray run just fine and reported no issues, the cluster seemed healthy at first (ready nodes, pods running), but I quickly realized that something was wrong. Pods had trouble connecting to each other and the node-local DNS that I installed (not via Kubespray) was crash looping.
After some debugging I found that it all seemed to depend on the following:

# ip link add dummy0 type dummy
Error: Unknown device type.
# modprobe dummy
modprobe: FATAL: Module dummy not found in directory /lib/modules/5.4.0-1026-kvm

Would you be open to having such a test in the preinstall stage? If so, I would be happy to create a PR.
I tried adding the following to see if it would detect the missing module and stop, and it did so:

- name: Check dummy module
  modprobe:
    name: dummy
    state: present

Any suggestions on how to test this in a better way?

@lentzi90 lentzi90 added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 22, 2021
@champtar
Copy link
Contributor

Can you test

- name: Check dummy module
  modprobe:
    name: dummy
    state: present
    params: 'numdummies=0'

what happens on system with already running nodelocal_dns ? I just don't want to create useless interface

@lentzi90
Copy link
Contributor Author

It works well for detecting the missing module also with numdummies=0! I'm not too sure about how to best test these things, but I tried the following:

  1. Run kubespray with the check
  2. Added node-local DNS
  3. Checked interfaces: only one dummy nodelocaldns
  4. Rerun kubespray, still just one dummy interface
  5. Remove node-local DNS and instead install it through kubespray instead. Again only the one dummy interface.
  6. Rerun kubespray. Same.
  7. Remove node-local DNS. The dummy interface is gone.
  8. Run Kubespray. No dummy interface.

I used nmcli device status to check the interfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants