-
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
kvm2 driver: check if user in "libvirt" group and exit if they are not #5617
Comments
preferably we should do that for the users. or tell them nicely that it should be like that @aidkz do you mind sharing our OS Distro and version ? |
|
CentOS is supposed to provide some kind of authentication mechanism, like PolicyKit ? Of course, that also means entering your password each time you want to access it... |
Note that the name of the group might vary between Linux distributions. For instance, on Ubuntu 16.04 the socket is owned by the "libvirtd" group... Might be better to refer to external documentation, like https://libvirt.org ? |
Running |
running
|
I would be happy to review any PR that would add this check ! |
/assign @nanikjava |
The main code resides inside All drivers init() function initialize the driver using the The 'cleanest' way is to add something like a 'precheck' function that will do other necessary steps after initializing the driver, however this will make the changed quite bit as there are codes (test and non-test) that will need to be refactored. The alternative is to add the group checking inside the init function however the downside is that the error message will be bit confusing for the user. |
@nanikjava - I suspect the current call to One trick here is how to reliably discover what group the user should be in to launch a VM. You will probably have more luck finding a Every distro I know of uses |
Testing was done by removing local account from libvirt group. This is the full error after running
The current behaviour is not good as it keeps on going even after the permission denied error shows up.
Personally would like for minikube to directly terminate after it shows up with the error. This tie in to my previous comment as the code does not treat fatal error such as this as a show stopper. The code must be refactored to take into account if any error does occur there should be some kind of flag to indicate that the code must stop. |
Idea of how the checking and failing will work nanikjava@3be173f |
@nanikjava can you create a PR with the idea? Mark is as WIP, easier to give feedback on the PR. |
@nanikjava, are you still working on this issue? |
Yes I will work on this as I have created an early proto of the idea. Thanks |
@josedonizetti will do. |
PR submitted #6120 |
❌ [KVM_CONNECTION_ERROR] Failed to start kvm2 VM. "minikube start" may fix it. driver start: creating network: getting libvirt connection: error connecting to libvirt socket.: virError(Code=38, Domain=7, Message='Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory') |
is anyone still interested to do this PR ? |
yes. me trying
…On Tue, May 12, 2020 at 4:07 AM Medya Ghazizadeh ***@***.***> wrote:
is anyone still interested to do this PR ?
@nanikjava <https://github.com/nanikjava>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5617 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHZBLE74UZZRZHDJSXHAH5LRRCAKXANCNFSM4JANEG6A>
.
|
@bushraKhan23 excellent. let me know if you needed any PR review |
/remove-lifecycle stale |
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. |
@bushraKhan23 still intereted? |
This issue is open for anyone who is interested in taking it on! |
could be solved together with #10070 /assign |
did'nt helped |
Please, add that user starting minikube should be in "libvirt" group. Because without adding user in "libvirt" group will be an error "authentification unavailable"
The text was updated successfully, but these errors were encountered: