-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
machines: list is empty nothing detected when libvirt-dbus pkg is installed #13343
Comments
@KKoukiou you may know what is happening? |
@dreamcat4 uninstalling libvirt-dbus is not a valid work around unfortunately. In fact uninstallaling that package just uses virsh as a communication means with libvirt but we plan to deprecate that soon. |
Hello again, lla /var/run/libvirt/libvirt-sock
srwxrwx--- 1 root libvirt 0 Dec 31 22:14 /var/run/libvirt/libvirt-sock=
$ cat /etc/group | grep libvirt
libvirt:x:139:id # <------------- here
libvirt-qemu:x:64055:libvirt-qemu,id
libvirt-dnsmasq:x:140:
libvirtdbus:x:997:id So if cockpit isn't connecting under the credentials of my logged in user then what is it connecting as? Or maybe it's some other issue? IDK Content Security Policy: The page's settings blocked the loading of a resource at eval ("default-src").
Content Security Policy: The page's settings blocked the loading of a resource at inline ("default-src"). common.js:2:319
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. machines
Content Security Policy: The page's settings blocked the loading of a resource at eval ("default-src").
Content Security Policy: The page's settings blocked the loading of a resource at inline ("default-src"). common.js:2:319
Content Security Policy: The page's settings blocked the loading of a resource at eval ("default-src").
Content Security Policy: The page's settings blocked the loading of a resource at inline ("default-src"). common.js:2:319
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. index.html
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. index.html
Source map error: Error: request failed with status 404
Resource URL: https://127.0.0.1:9090/cockpit/$aeb573d4937985f7a12f90c90a684e0eba9f66af713c40ecd17157e3cd3247aa/shell/index.css
Source Map URL: index.css.map
grep: /sys/class/dmi/id/power/autosuspend_delay_ms: Input/output error
cockpit.js:589:36
Source map error: Error: request failed with status 404
Resource URL: https://127.0.0.1:9090/cockpit/$aeb573d4937985f7a12f90c90a684e0eba9f66af713c40ecd17157e3cd3247aa/base1/patternfly.css
Source Map URL: patternfly.min.css.map
index.js: Setting LibvirtDBus as virt provider. machines.js:75:522014
Source map error: Error: request failed with status 404
Resource URL: https://127.0.0.1:9090/cockpit/$aeb573d4937985f7a12f90c90a684e0eba9f66af713c40ecd17157e3cd3247aa/base1/cockpit.js
Source Map URL: cockpit.min.js.map
Source map error: Error: request failed with status 404
Resource URL: https://127.0.0.1:9090/cockpit/$aeb573d4937985f7a12f90c90a684e0eba9f66af713c40ecd17157e3cd3247aa/machines/machines.js
Source Map URL: machines.min.js.map
getAllInterfaces action failed: {"problem":null,"name":"org.libvirt.Error","message":"Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied"} machines.js:75:188336
GET_ALL_VMS action failed: {"problem":null,"name":"org.libvirt.Error","message":"Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied"} machines.js:75:184524
GetDomainCapabilities failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied machines.js:75:189352
GET_ALL_STORAGE_POOLS action failed: {"problem":null,"name":"org.libvirt.Error","message":"Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied"} machines.js:75:184243
GET_ALL_NETWORKS action failed: {"problem":null,"name":"org.libvirt.Error","message":"Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied"} machines.js:75:183506
GET_ALL_NODE_DEVICES action failed: {"problem":null,"name":"org.libvirt.Error","message":"Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied"} machines.js:75:183855
NodeGetMemoryStats failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied machines.js:75:190926 So please let me know if you need any further information or otherwise @ejbolt had previously offered to provide extra logging etc. for this issue |
@dreamcat4 do you get the same error when you execute from CLI |
No, the command works from my [id:~] $ virsh -c qemu:///system list --all
Id Name State
------------------------------
5 win10 paused
- ubuntu18.10 shut off
θ98° [id:~] $ |
@dreamcat4 and same for the libvirt-dbus API? |
Hey... that one failed $ gdbus call --system --dest org.libvirt --object-path /org/libvirt/QEMU --method org.libvirt.Connect.ListDomains 0
Error: GDBus.Error:org.libvirt.Error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied |
Perhaps if i were to add the users |
@dreamcat4 Or try to follow the steps mentioned here https://www.libvirt.org/dbus.html#usage. Seems exactly your issue. |
Yeah... just rebooted and its working now. Thing is: it's not just my issue, it affects all of the users on ubuntu platform. Not sure what you want to do about it though. If it's something can be solved in packaging, or to display some new error message, or explain in the documentation. |
Just to be a little clearer about what the solution / workaround is here. In case anybody else needs to be doing this: # ======
# install cockpit on ubuntu 19.10
sudo apt-get install -y cockpit cockpit-machines libvirt-dbus
# fix for issue 'machines list is empty'
# https://github.com/cockpit-project/cockpit/issues/13343
sudo usermod -a -G libvirt libvirtdbus
sudo usermod -a -G libvirt libvirt-qemu
# must reboot (or restart the affected systemd services) for changes to take effect |
@dreamcat4: This is tracked here: https://bugs.launchpad.net/ubuntu/+source/libvirt-dbus/+bug/1802005 |
As an FYI to anyone finding this. The ONLY thing required to fix this on Ubuntu 20.04, and potentially others, is:
DO NOT add the Check the bug report for details: https://bugs.launchpad.net/ubuntu/+source/libvirt-dbus/+bug/1802005 Also Ubuntu does not use the polkit files for access, that configuration is not needed. |
Cockpit version: 202.1-1
OS: Ubuntu 19.10
Page: Machines
This problem was originally reported here:
#10121 (comment)
And I can confirm it's still an issue as of today right now.
Steps to reproduce
libvirt-dbus
cockpit-machines
Problem is that:
Once the user knows the workaround, then they can then know to uninstall the package
libvirt-dbus
and then cockpit will start working again. Which is pretty easy solution. However there is no way for the user to know this thing, to remove that other package.The other main problem is that if there is a different package also installed on the system which actually requires
libvirt-dbus
... that will then lead to a conflict such that cockpit machines tab is broken since the conflicting package is a dependency of something else and therefore cannot be uninstalled / removed. So then maybe fixing this bug is kindda worthwhile.Not sure the problem. But there is code referenced in other issue (linked included above). So maybe it's touching that parts of the code still. Perhaps it's was already supposed to be fixed previously. But later ended up coming back again in the form of a regression. Or could not fully test on the other platform.
The text was updated successfully, but these errors were encountered: