-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
none driver doesn't start if /bin/bash doesn't exist. #4122
Comments
I found also, that I cannot delete the machine using I also forgot to mention that the following line (for quick reference) has the
|
Thanks for the bug report! I don't love that minikube requires a shell at all, but this seems like reasonable workaround. My preference however is to call exec.LookPath() instead of double-forking. I'd be happy to review a PR which does so. Thanks again! |
Alternatively - perhaps this should just use |
@tstromberg I thought about that but didn't know if minikube used any bash specific code in its commands. If that works then it will work on systems like NixOS as well. I'll look into what it will take for me to submit the pull request making that change, but if someone else is also interested in this issue they should feel free to not wait for me. |
Or maybe just continue to use I haven't investigated how bashist the scripts are, but do recall having to install bash just for minikube... Supporting NixOS for running the "VM" is probably strectching things. Hopefully nothing else breaks, otherwise welcome to use Minikube OS. |
@afbjorklund is minikube no longer the recommended way to setup a development kubernetes cluster without any configuration? In this case, the issue is just the none driver's shell invocations which seem more portable by using sh anyway. I haven't seen minikube OS but I can look into that if it's the recommended replacement for minikube. @tstromberg is the bash -c there just to lookup the command in the path? If so, then LookPath seems like the better solution in general. Why would LookPath not be preferred over invoking bash? |
Currently minikube assumes and expects that you start in a VM dedicated for the purpose (of running Kubernetes). The "none" driver bypasses VM allocation and let's the user provide their own VM. Using minikube to run directly on the laptop (or other developer machine) is not well defined, and assumes things - such as |
@afbjorklund that makes more sense. Yeah, I'm not looking to do this for the general case but I'm making a test harness that interacts with minikube and running through the motions with the none driver real quick makes the verification that my test harness is working correctly much faster. I'll see about submitting a pull request for changing the shell used or using the path for the none driver. Thanks for the caveats to the none driver! |
@tstromberg I would like to work on the transition to using From the above conversation, I can infer that I have to find the full path of the command using |
@palnabarun that's my understanding as well. You can do a quick test that this is working by creating a chroot or other isolated environment and ensure that bash can be found by looking the in the PATH when stored in a non-standard location. Alternatively, if you want to setup a NixOS VM, testing should be direct in that environment since there isn't any /bin/bash. |
Thanks @alunduil for the insights. :) I will test it out inside a NixOS VM. |
… of using /bin/bash Issue kubernetes#4122
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@alunduil I would love to see removing the depdendecy on bash, however some commands we have in bootstrapper, does use bash functions, as part of this PR #5530 I would review any PR that carefully converts the commands to exec.Cmd format ( with args as oppsed to /bin/bash/ -c |
Remember, that I'm fine with bash as long as the path is not assumed since different systems may place it elsewhere. Using |
A quick |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Command:
Output: https://gist.github.com/alunduil/1e78933095fc69402ec0dc2e0927724f
Minikube logs: https://gist.github.com/alunduil/a05cc1071bb0cf709f875817198d20f8
My os-release: https://gist.github.com/alunduil/f49e9aa43b826de82011eada8dc4cf75
In NixOS, there is no /bin/bash so starting the none driver fails to function. A simple fix for this error would be to use /usr/bin/env to invoke bash by following the path rather than assuming that it's hard coded, but I'm not sure what other assumptions that might break. This solution should work because NixOS ensures a symlink exists at /usr/bin/env that points at the executable and most distributions that I'm aware of ship with /usr/bin/env.
If that sounds like a reasonable solution, I can work on figuring out a pull request (unless someone can get to it faster).
The text was updated successfully, but these errors were encountered: