GNU bug report logs - #64073
libvirtd requires restart to function

Previous Next

Package: guix;

Reported by: Christian Miller <miller.christian <at> proton.me>

Date: Wed, 14 Jun 2023 22:42:01 UTC

Severity: normal

Done: Josselin Poiret <dev <at> jpoiret.xyz>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64073 in the body.
You can then email your comments to 64073 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#64073; Package guix. (Wed, 14 Jun 2023 22:42:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christian Miller <miller.christian <at> proton.me>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 14 Jun 2023 22:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christian Miller <miller.christian <at> proton.me>
To: "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: libvirtd requires restart to function
Date: Wed, 14 Jun 2023 22:40:48 +0000
[Message part 1 (text/plain, inline)]
Currently libvirtd does not work without running "sudo herd restart libvirtd". Upon starting virt-manager I can't connect to the socket but if I restart libvirtd it works fine.

I tested the 1.4.0 image in a VM and there is no issue. After that I did a guix pull and reconfigured the system and I have the same issue again in the VM.
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#64073; Package guix. (Thu, 15 Jun 2023 12:39:01 GMT) Full text and rfc822 format available.

Message #8 received at 64073 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christian Miller <miller.christian <at> proton.me>
Cc: 64073 <at> debbugs.gnu.org
Subject: Re: bug#64073: libvirtd requires restart to function
Date: Thu, 15 Jun 2023 14:37:57 +0200
Hi,

Christian Miller <miller.christian <at> proton.me> skribis:

> Currently libvirtd does not work without running "sudo herd restart
> libvirtd". Upon starting virt-manager I can't connect to the socket
> but if I restart libvirtd it works fine.
>
> I tested the 1.4.0 image in a VM and there is no issue. After that I
> did a guix pull and reconfigured the system and I have the same issue
> again in the VM.

Are there any hints in /var/log/messages as to what goes wrong with
libvirtd when it is first started?

I suspect it’s getting started “too early”.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#64073; Package guix. (Fri, 16 Jun 2023 20:45:01 GMT) Full text and rfc822 format available.

Message #11 received at 64073 <at> debbugs.gnu.org (full text, mbox):

From: Christian Miller <miller.christian <at> proton.me>
To: "64073 <at> debbugs.gnu.org" <64073 <at> debbugs.gnu.org>
Subject: libvirtd requires restart to function
Date: Fri, 16 Jun 2023 20:44:09 +0000
[Message part 1 (text/plain, inline)]
Hi,

there is not an error message upon starting it but by stopping it:
Jun 14 23:52:18 localhost shepherd[1]: Stopping service libvirtd... 
Jun 14 23:52:18 localhost libvirtd: 157: error : virGDBusGetSystemBus:99 : internal error: Unable to get system bus connection: Could not connect: No such file or directory 

I have added the command output of "grep -i libvirt /var/log/messages" as attachment.

NOTE: That permission denied error on the ISO is happening since I copied /etc/libvirt from my old system.  I have 10+ VMs and thought this works as well as of re importing every vm.

PS:
I wanted to create a VM to not taint logs but since I upgraded the VM I just have a black screen.  It was a Guix VM installed through the installer with GNOME.  I ran guix pull and added spice, libvirt and virtlog to the config.  After guix system reconfigure config.scm I know have a black screen upon logging in to the system.  This was only after reconfiguring the system.  Before it worked normally.  I used the ISO that reports a permission denied error in the logs I attached.  GDM works fine but after logging it is just a black screen.  Also my mouse cursor changes from a arrow pointer to the default cross cursor from x11.  I guess something is broken on latest?

Best Regards
Christian Miller
[log.txt (text/plain, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#64073; Package guix. (Sat, 17 Jun 2023 16:03:01 GMT) Full text and rfc822 format available.

Message #14 received at 64073 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Christian Miller <miller.christian <at> proton.me>, "64073 <at> debbugs.gnu.org"
 <64073 <at> debbugs.gnu.org>
Subject: Re: bug#64073: libvirtd requires restart to function
Date: Sat, 17 Jun 2023 18:02:14 +0200
[Message part 1 (text/plain, inline)]
Hi Christian,

Christian Miller via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:

> Hi,
>
> there is not an error message upon starting it but by stopping it:
> Jun 14 23:52:18 localhost shepherd[1]: Stopping service libvirtd... 
> Jun 14 23:52:18 localhost libvirtd: 157: error : virGDBusGetSystemBus:99 : internal error: Unable to get system bus connection: Could not connect: No such file or directory 

Seems that dbus is needed for libvirt, but it is not listed as a
requirement for the shepherd service.  I don't use libvirt, but would
you be able to test the following patch?

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#64073; Package guix. (Sat, 17 Jun 2023 16:04:02 GMT) Full text and rfc822 format available.

Message #17 received at 64073 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Josselin Poiret <dev <at> jpoiret.xyz>,
 Christian Miller <miller.christian <at> proton.me>,
 "64073 <at> debbugs.gnu.org" <64073 <at> debbugs.gnu.org>
Subject: [PATCH] services: libvirt: Add requirement on dbus.
Date: Sat, 17 Jun 2023 18:03:03 +0200
From: Josselin Poiret <dev <at> jpoiret.xyz>

* gnu/services/virtualization.scm (libvirt-shepherd-service): Add requirement
on dbus.
---
 gnu/services/virtualization.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index 880557915c..506f5a7ab6 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -478,6 +478,7 @@ (define (libvirt-shepherd-service config)
     (list (shepherd-service
            (documentation "Run the libvirt daemon.")
            (provision '(libvirtd))
+           (requirement '(dbus-system))
            (start #~(make-forkexec-constructor
                      (list (string-append #$libvirt "/sbin/libvirtd")
                            "-f" #$config-file
-- 
2.40.1





Information forwarded to bug-guix <at> gnu.org:
bug#64073; Package guix. (Mon, 19 Jun 2023 19:30:02 GMT) Full text and rfc822 format available.

Message #20 received at 64073 <at> debbugs.gnu.org (full text, mbox):

From: Christian Miller <miller.christian <at> proton.me>
To: "64073 <at> debbugs.gnu.org" <64073 <at> debbugs.gnu.org>
Subject: libvirtd requires restart to function
Date: Mon, 19 Jun 2023 19:29:07 +0000
Hello,

I tested your patch and it works.  With the patch virt-manager does instantly connect without any manual interference.

Since this is the first time I did this, just to be sure I did everything correctly, I list how I tested it.

I cloned the git repository
I created a file called libvirtd.patch with your contents
git apply libvirtd.patch
guix shell -D guix --pure
./bootstrap
./configure --localstatedir=/var
make
make check (had 2 errors, authenticate and something else)
after that I executed "sudo -E ./pre-inst-env guix system reconfigure ~/guix/system.cm"
I rebooted the system and launched virt-manager which directly connected.

Best Regards,
Christian Miller




Information forwarded to bug-guix <at> gnu.org:
bug#64073; Package guix. (Tue, 20 Jun 2023 12:22:01 GMT) Full text and rfc822 format available.

Message #23 received at 64073 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Christian Miller <miller.christian <at> proton.me>, "64073 <at> debbugs.gnu.org"
 <64073 <at> debbugs.gnu.org>
Subject: Re: bug#64073: libvirtd requires restart to function
Date: Tue, 20 Jun 2023 14:21:30 +0200
[Message part 1 (text/plain, inline)]
Hi Christian,

Christian Miller via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:

> I tested your patch and it works.  With the patch virt-manager does instantly connect without any manual interference.
>
> Since this is the first time I did this, just to be sure I did everything correctly, I list how I tested it.
>
> I cloned the git repository
> I created a file called libvirtd.patch with your contents
> git apply libvirtd.patch
> guix shell -D guix --pure
> ./bootstrap
> ./configure --localstatedir=/var
> make
> make check (had 2 errors, authenticate and something else)
> after that I executed "sudo -E ./pre-inst-env guix system reconfigure ~/guix/system.cm"
> I rebooted the system and launched virt-manager which directly connected.

Great!  Thanks for going the extra mile testing this, I didn't know how
familiar you were with the Guix development process.  We could also
advertise the simpler `guix time-machine` with the branches from [1],
although processing the new patch is not instantaneous (and I don't
think bug reports are scanned for patches).

In any case, I'll try to push it ASAP with some other changes!

[1] https://git.guix-patches.cbaines.net/guix-patches

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

Reply sent to Josselin Poiret <dev <at> jpoiret.xyz>:
You have taken responsibility. (Fri, 07 Jul 2023 19:49:02 GMT) Full text and rfc822 format available.

Notification sent to Christian Miller <miller.christian <at> proton.me>:
bug acknowledged by developer. (Fri, 07 Jul 2023 19:49:02 GMT) Full text and rfc822 format available.

Message #28 received at 64073-done <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Christian Miller <miller.christian <at> proton.me>, 64073-done <at> debbugs.gnu.org
Subject: Re: bug#64073: libvirtd requires restart to function
Date: Fri, 07 Jul 2023 21:48:15 +0200
[Message part 1 (text/plain, inline)]
Hi Christian,

Josselin Poiret <dev <at> jpoiret.xyz> writes:

> Great!  Thanks for going the extra mile testing this, I didn't know how
> familiar you were with the Guix development process.  We could also
> advertise the simpler `guix time-machine` with the branches from [1],
> although processing the new patch is not instantaneous (and I don't
> think bug reports are scanned for patches).
>
> In any case, I'll try to push it ASAP with some other changes!

Pushed as 612399df3edcbe4d1b1da784bd23440398d27454, closing.

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Aug 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.