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

running libipvs inside the containers fail #4

Closed
murali-reddy opened this issue Apr 24, 2017 · 5 comments
Closed

running libipvs inside the containers fail #4

murali-reddy opened this issue Apr 24, 2017 · 5 comments

Comments

@murali-reddy
Copy link

I was trying to an application build with libipvs and observed that it will fail, even if you run container with "--privileged --cap-add=ALL".

"panic: Running modprobe ip_vs failed with message: modprobe: can't change directory to '/lib/modules': No such file or directory, error: exit status 1"

Reason for failure is use of modprobe (https://github.com/mqliang/libipvs/blob/master/ipvs.go#L45). Perhaps "modinfo ip_vs" is safe check that works both on host and container.

@murali-reddy
Copy link
Author

My bad. Even modinfo fails.

modinfo: can't open '/lib/modules/4.4.0-72-generic/modules.dep': No such file or directory

@mqliang
Copy link
Owner

mqliang commented Apr 24, 2017

Maybe it's safe to remove the modprobe -va ip_vs check, after all, If ipvs kernel module is not installed on host, following Netlink call will failed. I have no time at this moment to verify this, you are welcomed to check this and post a PR .

@murali-reddy
Copy link
Author

Closing the bug. There is work arond for this issue.

Mount /lib/modules from host to container. For e.g i added below lines to daemonset to fix this.

    volumeMounts:
      - mountPath: /lib/modules
        name: lib-modules
        readOnly: true
  volumes:
    - name: lib-modules
      hostPath:
          path: /lib/modules

@ankitrohi
Copy link

ankitrohi commented Mar 25, 2019

Closing the bug. There is work arond for this issue.

Mount /lib/modules from host to container. For e.g i added below lines to daemonset to fix this.

    volumeMounts:
      - mountPath: /lib/modules
        name: lib-modules
        readOnly: true
  volumes:
    - name: lib-modules
      hostPath:
          path: /lib/modules

Hi,
I am still getting following error after mounting the above volume:
Running modprobe ip_vs failed with message: modprobe: invalid option -- 'a'\nBusyBox v1.30.0 (2018-12-31 17:51:13 UTC) multi-call binary.\n\nUsage: modprobe [-rq] MODULE [SYMBOL=VALUE]...\n\n\t-r\tRemove MODULE\n\t-q\tQuiet, error: exit status 1"

What might be the reason?

@ankitrohi
Copy link

Closing the bug. There is work arond for this issue.
Mount /lib/modules from host to container. For e.g i added below lines to daemonset to fix this.

    volumeMounts:
      - mountPath: /lib/modules
        name: lib-modules
        readOnly: true
  volumes:
    - name: lib-modules
      hostPath:
          path: /lib/modules

Hi,
I am still getting following error after mounting the above volume:
Running modprobe ip_vs failed with message: modprobe: invalid option -- 'a'\nBusyBox v1.30.0 (2018-12-31 17:51:13 UTC) multi-call binary.\n\nUsage: modprobe [-rq] MODULE [SYMBOL=VALUE]...\n\n\t-r\tRemove MODULE\n\t-q\tQuiet, error: exit status 1"

What might be the reason?

Resolved it. Somehow, the base image I was using had only, -q and -r options for modprobe, not -a. So, I changed the base image. Now its working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants