-
Notifications
You must be signed in to change notification settings - Fork 51
Error while running under kubernetes #21
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
Comments
Looks like a timing issue. Should the startvm script wait for container interface to come up and then program it ? Or is it due to #20 ? |
I see it happening almost all the time. Even after I created a docker image with the qcow2 image embedded. I do not see this issue when I run directly with docker using debug mode "bash" and then running the 'startvm' script manually. @methadata Any guidance is much appreciated. This is where it fails with the RTNETLINK error. Could it be a conflicting default gateway ?
|
Sorry for the delay in the reply. Unfortunately, I'm not able to reproduce this error, even with Kubernetes. The error described above seems to be more related with the creation of the macvtap device, as it has appeared in #12 . Long story short: the name of the new macvtap device clashed if there was another kvm container running on the Docker Host. That's why I randomised the device name. In this particular case, I do not know why the macvtap device creation fails, and why it's working if the startvm script is launched manually. To continue investigating further this issue, I have created a new branch in this repo, so there's a new tag in docker hub called bugfix_21. Please try to run the container again using this new image: |
Thanks for your reply. Here is the latest test result with the debug image: First Run
All good here, VM comes up perfectly fine. I deleted the above deployment and waited for a minute to deploy it again. Second Run
If informational, the IP addresses to the containers are handed by Flannel in my environment. With the debug image, the deployment goes for a CrashLoopBackOff (which is what you expected I guess). Note that, I could notice the size of my qcow2 image change after the first run. Next few runs throw the same error as 'Second Run'. However, if I wait again for a while after deleting the deployment from the second run (after confirming that the deployment/pod/containers related were all deleted), I see it produce similar logs as 'First Run'. e.g.
|
Also note that, when I kill the container spawned on behalf of my deployment/pod as part of the First Run, kubernetes attempts to re-spawn the container (as per the deployment policy), and the logs starts to show the following:
|
As you pointed out, the issue seems to be related with the respawn of the container that k8s performs. In this context, the ethX device present in the container has something already attached (the old macvtap?) that prevents the creation of a new macvtap device attached to it. I have commited a new release (7c64a96) of the Meanwhile I will try to reproduce the issue myself with kubernetes. |
These changes work great, confirmed that the container re-spawn works good. Here is the log:
Thank you for fixing this. Can this be merged to latest and I can confirm on latest build as well ? |
RTNETLINK answers: File exists
Cannot find device "macvtapa85bcf"
Cannot find device "macvtapa85bcf"
cat: /sys/devices/virtual/net/macvtapa85bcf/tap*/dev: No such file or directory
mknod: missing operand after 'c'
Special files require major and minor device numbers.
Try 'mknod --help' for more information.
INFO: DHCP configured to serve IP 192.168.75.19/32 via macvtapa85bcf (attached to eth0)
INFO: Lauching dnsmasq ......
INFO: Launching /usr/libexec/qemu-kvm .......
2016-11-30T17:38:19.804224Z qemu-kvm: -netdev tap,id=net0,vhost=on,fd=3: TUNGETIFF ioctl() failed: Inappropriate ioctl for device
TUNSETOFFLOAD ioctl() failed: Inappropriate ioctl for device
The text was updated successfully, but these errors were encountered: