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
Stop trying to guess the name of the libvirt service/socket (fedora-35 necessary changes) #387
Stop trying to guess the name of the libvirt service/socket (fedora-35 necessary changes) #387
Conversation
69df1bb
to
d4f9985
Compare
518f650
to
7d88784
Compare
adf52f4
to
7e4c94e
Compare
/packit build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! That's a nice cleanup as well. One question (doesn't affect the code). Can you please rebase this, to run this through packit? That's quite important in this case IMHO.
Still lots of failures on fedora-35, capturing log URL. Looks like you need to start some libvirt-network service as well perhaps? |
fc422e4
to
a83dc18
Compare
And leave the service activation to libvirt itself. In all our supported distros the libvirt service is socket activated. The socket is running by default, from the very first moment the user installs the package. A stopped libvirt socket means that the user manually changed the default state, and should be left alone to do so. In addition to that, the libvirt daemon changed recently to a modular achitecture, so instead of a single monolithic libvirtd daemon we now get one for each driver (domain, storage, network, interfaces etc). Some distros already opted in the new modular daemons, (see https://www.mail-archive.com/libvir-list@redhat.com/msg219931.html) but many keep using the old monolithic libvirtd daemon. As now we will have many sockets to check for their state, we decided to get rid of any libvirt service/socket name detection logic from cockpit-machines. This logic was previously used to detect if the service was running and if not we showed the user an empty state screen. That also helped us to listen to socket/service changes and update the UI accordingly. This commit replaces this logic will a simple API call in the initial render of this app which allows us to check if a connection type is available; if that fails for any of the system/session connections, that means that the libvirt service is not available for the connection. For the same reason of the name detection logic being problematic, let's stop providing to the cockpit-machines users the ability to start/enable the libvirt service/socket from the cockpit-machines UI directly. This now allows us to make cockpit-machines work on fedora-35.
…ardown Same as we do for libvirtd / virtqemud. We do remove state in /var/run, without restarting the services libvirt get's somehow confused. Starting is done automatically as these are socket activated.
a83dc18
to
a023e71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Still rather ad-hoc, but we'll clean this up over time when more OSes require this. Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fails all over on the testing farm: 😢
error: Failed to connect socket to '/var/run/libvirt/virtnetworkd-sock': No such file or directory
error: failed to get network 'default'
As packit/f35 currently succeeds, this is a regression I'm afraid.
993880e
to
0642e99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks great, good to land on green. I also commented on the libvirt issue, thanks for filing!
0642e99
to
c6e0f26
Compare
At least the failure looks different now..
|
c6e0f26
to
70d5de8
Compare
… package installation
70d5de8
to
d7d07f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niiice! (But no cookies for the Fedora package policy.. this will hit users in real-life as well..)
And leave the service activation to libvirt itself.
In all our supported distros the libvirt service is socket activated.
The socket is running by default, from the very first moment the user
installs the package. A stopped libvirt socket means that the user
manually changed the default state, and should be left alone to do so.
In addition to that, the libvirt daemon changed recently to a modular
achitecture, so instead of a single monolithic libvirtd daemon we now
get one for each driver (domain, storage, network, interfaces etc). Some distros already
opted in the new modular daemons, (see https://www.mail-archive.com/libvir-list@redhat.com/msg219931.html)
but many keep using the old monolithic libvirtd daemon.
As now we will have many sockets to check for their state, we decided to get
rid of any libvirt service/socket name detection logic from
cockpit-machines.
This logic was previously used to detect if the service was running
and if not we showed the user an empty state screen.
That also helped us to listen to socket/service changes and update
the UI accordingly.
This commit replaces this logic will a simple API call in the initial
render of this app which allows us to check if a connection type is
available; if that fails for any of the system/session connections, that means that the libvirt service is not available for the connection.
For the same reason of the name detection logic being problematic, let's
stop providing to the cockpit-machines users the ability to start/enable
the libvirt service/socket from the cockpit-machines UI directly.