-
Notifications
You must be signed in to change notification settings - Fork 118
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
No module ip_vs in Docker4Mac's kernel #4754
Comments
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Hello, A tiny bump to update the issue: it is still the same with the latest edge version (2.4.2.0):
|
@dduportal As of 2.4.2.0 we are up to date with the latest version of LinuxKit, so any modules that are present upstream should be present in Docker Desktop. |
If the module is still missing, you should probably raise it in https://github.com/linuxkit/linuxkit. |
Hello @stephen-turner thanks a lot for the answer. I'm going to check with the latest version, and with LinuxKit part if the issue is still there. If you don't mind, I'll report here the results and close once it will be ok (either with the latest Docker Desktop, or when LinuxKit and the downstream Docker Desktop will be updated). Sounds good ? Thanks for all this awesome work! |
Closing the issue, as I can confirme that the module ip_vs can be loaded on the latest Docker Desktop Edge (version 2.5.0.1). Reproduction using Ubuntu (my initial command with Alpine is not working due to Alpine's): # Inspiration from https://dev.to/douglasmakey/how-to-setup-simple-load-balancing-with-ipvs-demo-with-docker-4j1d
# Start 2 containers to be loadbalanced
$ docker run -d --name first -t jwilder/whoami # Retrieve IP with docker inspect: 172.17.0.3
$ docker run -d --name second -t jwilder/whoami # Retrieve IP with docker inspect: 172.17.0.4
$ docker run --rm -ti -v /lib/modules:/lib/modules --privileged ubuntu:20.04 bash
> apt-get update
> apt-get install -y kmod curl ipvsadm
> modprobe ip_vs
> ipvsadm -A -t 100.100.100.100:80 -s rr
> curl 172.17.0.3:8000 # Should answer "I'm <container id>"
> ipvsadm -a -t 100.100.100.100:80 -r 172.17.0.3:8000 -m
> curl 172.17.0.4:8000 # Should answer "I'm <container id>"
> ipvsadm -a -t 100.100.100.100:80 -r 172.17.0.4:8000 -m
> ipvsadm -l # Check load balancing config
> curl 100.100.100.100; curl 100.100.100.100; curl 100.100.100.100 # You should see "I'm <container id>" with the id changing |
Great, thanks for checking. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
17EC4488-B01D-4BA8-ABCC-DD188197C8D5/20200708141647
Expected behavior
When loading the kernel module
ip_vs
from a (privileged) container with access to the VM's kernel modules,Then I expect the module to be loaded at least until the VM is stopped or restarted
Actual behavior
The kernel module absent from the VM's modules kernel config, and cannot be loaded.
An error
module ip_vs not found in modules.dep
is thrown when loading the module:Information
I want to execute containers running keepalived services with a virtual IP in a docker private network.
It utilizes the "IP Virtual Server" (
ip_vs
) for loadbalancing the virtual IP through vrrp protocol.This is something which used to work in earlier versions of Docker4Mac and docker-machine,
but not sure when this issue started to happen (not more than 1 year ago).
It works on most of the Docker on Linux (as soon as the host kernel has the module of course :) ).
Some uses case:
My configuration:
This issue is related to other "missing" kernel modules: #4560, #4549, #4660, #4556.
This (old) comment from Justin - #719 (comment) might give some clues but I was not able to try the "compile module" solution and switched to multipass for this use case.
Sounds like a non trivial issue as there is a balance between not embedding too much modules to ensure fast VM, and usages.
=> In my case, it would totally be acceptable to NOT have the module loaded or even present by default, but if I have an option to retrieve & build the module on demand, and then I can load it, even on each reboot.
(A docker file with the module as "arg" ? or an advanced panel in the GUI where to list the module I want, a bit like the
daemon.json
so linuxkit would be tuned ? Or even a procedure to "rebuild" my own docker4mac).Diagnostic logs
Steps to reproduce the behavior
docker run --rm -ti -v /lib/modules:/lib/modules --privileged alpine:3.12 sh -c "modprobe ip_vs && lsmod | grep ip_vs"
as described in the section Actual Behavior below.The text was updated successfully, but these errors were encountered: