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

driver=none sets --extra-config=kubelet.resolv-conf for incorrect path in Ubuntu 16.04 #9031

Closed
anencore94 opened this issue Aug 19, 2020 · 12 comments
Labels
co/none-driver kind/support Categorizes issue or PR as a support question. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@anencore94
Copy link
Contributor

anencore94 commented Aug 19, 2020

Steps to reproduce the issue:

  1. minikube --vm-driver=none start on Ubuntu 16.04
  2. then coredns pod's status become CrashLoopBackOff as in none on Ubuntu should automatically set --extra-config=kubelet.resolv-conf #3511

Full output of failed command:

Since there isn't any file /run/systemd/resolve/resolv.conf in Ubuntu 16.04, The auto-setting --extra-config=kubelet.resolv-conf=/run/systemd/resolve/resolv.conf doesn't work.

# ls /run/systemd/resolve/resolv.conf
ls: cannot access '/run/systemd/resolve/resolv.conf': No such file or directory

# ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 29  8월 12  2019 /etc/resolv.conf -> ../run/resolvconf/resolv.conf

So different from minikube start on Ubuntu 18.04, the stdout of minikube start on Ubuntu 16.04 doesn't have following line:
▪ kubelet.resolv-conf=/run/systemd/resolve/resolv.conf

How to fix it in Ubuntu 16.04:
By https://stackoverflow.com/questions/53075796/coredns-pods-have-crashloopbackoff-or-error-state/53414041#53414041

Following solution works also on Ubuntu 16.04:
Hacky solution: Disable the CoreDNS loop detection

Edit the CoreDNS configmap:

kubectl -n kube-system edit configmap coredns
Remove or comment out the line with loop, save and exit.

Then remove the CoreDNS pods, so new ones can be created with new config:

kubectl -n kube-system delete pod -l k8s-app=kube-dns

Other trial in Ubuntu 16.04:.
I've tried minikube start with --extra-config=kubelet.resolv-conf=/run/resolvconf/resolv.conf option, But it doesn't work as I expected. The coredns pod also become CrashLoopBackOff. I have no idea why this happens.

@tstromberg
Copy link
Contributor

I didn't think this flag was required for Ubuntu 16.04. What happens if you run --extra-config=kubelet.resolv-conf=/etc/resolv.conf?

@anencore94
Copy link
Contributor Author

@tstromberg The same issue happen with --extra-config=kubelet.resolv-conf=/etc/resolv.conf.

coredns pod became crashloopbackoff by loop plugin

@xieydd
Copy link

xieydd commented Aug 29, 2020

same error

@medyagh
Copy link
Member

medyagh commented Aug 31, 2020

@xieydd is your error also on ubuntu 16.04 ?

@anencore94 does this happen only on ubuntu 16.04 and not ubuntu 18.04 or newer? (ubuntu 16.04 end of life is less than a year in april 2021)

@medyagh
Copy link
Member

medyagh commented Aug 31, 2020

@anencore94 I am curious is there a reason you are not using our Docker driver instead of none ?
none is not our preferred driver
/triage needs-information
/triage support

@k8s-ci-robot k8s-ci-robot added triage/needs-information Indicates an issue needs more information in order to work on it. kind/support Categorizes issue or PR as a support question. labels Aug 31, 2020
@anencore94
Copy link
Contributor Author

@medyagh Yeap It only happens on 16.04.
Since the path was right on 18.04

I've been using nvdia-docker to use gpu with minikube. With your official docs, only kvm2 and none driver supports gpu. Also, none driver setting was easier than kvm2 driver, so i choose to use none driver.

@xieydd
Copy link

xieydd commented Sep 1, 2020

@medyagh Yep, i use ubuntu 16.04, and i have same purpose as @anencore94 , use minikube and gpu-device-plugin.

@priyawadhwa
Copy link

Hey @anencore94 I just wanted to confirm that you ran --extra-config on a brand new cluster? That flag doesn't work on pre-existing clusters (that issue can be tracked here #8661)

To make sure it worked, could you run:

minikube delete
minikube start --extra-config=kubelet.resolv-conf=/etc/resolv.conf

and let us know if that fixes the issue?

@anencore94
Copy link
Contributor Author

@priyawadhwa Thanks for checking. But I did this on a brand-new cluster.
I think it is not the same reason with #8661.

Since with log, I can see minikube start --extra-config=kubelet.resolv-conf=/etc/resolv.conf sets such extra-config successfully. But CrashLoopBackOff happens.

@medyagh
Copy link
Member

medyagh commented Oct 7, 2020

@anencore94 do you still have this issue ?

do you mind sharing the logs for the crash that you see ?

btw KVM driver should not be too hard to install.

@anencore94
Copy link
Contributor Author

@medyagh Sry.. I just changed my os to Ubuntu 20.04 now.
When I have some chance to work on Ubuntu 16.04, I'll test again and share log here.
Thanks.

@tstromberg tstromberg changed the title driver=none automatically set --extra-config=kubelet.resolv-conf, but the path is different on ubuntu 16.04 driver=none sets --extra-config=kubelet.resolv-conf for incorrect path in Ubuntu 16.04 Oct 21, 2020
@tstromberg tstromberg added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. and removed kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Oct 21, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/none-driver kind/support Categorizes issue or PR as a support question. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

8 participants