GNU bug report logs - #47541
libvirt does not work

Previous Next

Package: guix;

Reported by: qblade <qblade <at> protonmail.com>

Date: Thu, 1 Apr 2021 13:39:01 UTC

Severity: normal

Done: Pierre Langlois <pierre.langlois <at> gmx.com>

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 47541 in the body.
You can then email your comments to 47541 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#47541; Package guix. (Thu, 01 Apr 2021 13:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to qblade <qblade <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 01 Apr 2021 13:39:02 GMT) Full text and rfc822 format available.

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

From: qblade <qblade <at> protonmail.com>
To: "guix-devel <at> gnu.org" <guix-devel <at> gnu.org>,
 "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: libvirt does not work
Date: Thu, 01 Apr 2021 13:38:41 +0000
[Message part 1 (text/plain, inline)]
after this commit, the `virsh` does not work corrent:

```
commit 383b02a370252c08eb1d43ac94d659c1d3993a35
Author: Pierre Langlois <pierre.langlois <at> gmx.com>
Date:   Sat Mar 20 21:31:22 2021 +0000

    gnu: libvirt: Update to 7.1.0.

    * gnu/packages/virtualization.scm (libvirt): Update to 7.1.0.
    [source]: Remove libvirt-create-machine-cgroup.patch, add
    libvirt-do-not-create-var-dirs.patch.
    [build-system]: Switch to meson-build-system.
    [arguments]: Use meson-0.55.  Adapt #:configure-flags for meson, there is no
    need for --docdir anymore.  Remove fix-BOURNE_SHELL-definition phase.  Add
    fix-sysconfdir-and-localstatedir phase.  Adapt disable-broken-tests to meson.
    [native-inputs]: Add python-docutils and rpcsvc-proto.
    * gnu/packages/patches/libvirt-create-machine-cgroup.patch: Delete.
    * gnu/packages/patches/libvirt-do-not-create-var-dirs.patch: New patch.
    * gnu/local.mk (dist_patch_DATA): Add new patch, remove the other.

    Signed-off-by: Ludovic Courtès <ludo <at> gnu.org>

```

Command to reproduce wrong:
```
# This is wrong:
# After commit
luhux <at> thinkpad-x230 ~ [date: Thu 01 Apr 2021 09:16:37 PM HKT]
$ GUIX_BUILD_OPTIONS="" guix time-machine --commit=383b02a370252c08eb1d43ac94d659c1d3993a35 -c 8 -M 8 -- environment --ad-hoc libvirt -- virsh connect
 qemu:///system
error: failed to connect to the hypervisor
error: Failed to connect socket to 'var/run/libvirt/libvirt-sock': No such file or directory


```

It uses the wrong path to connect to libvirtd of the current system.

Command to reproduce corrent:
```
# This is corrent:
# Before commit


luhux <at> thinkpad-x230 ~ [date: Thu 01 Apr 2021 09:16:32 PM HKT]
$ GUIX_BUILD_OPTIONS="" guix time-machine --commit=c536f0b217714917988d2f412999d978c2f2f495 -c 8 -M 8 -- environment --ad-hoc libvirt -- virsh connect qemu:///system
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
```

I use strace to create verbose log:


```
luhux <at> thinkpad-x230 ~ [date: Thu 01 Apr 2021 09:22:18 PM HKT]
$ GUIX_BUILD_OPTIONS="" guix time-machine --commit=383b02a370252c08eb1d43ac94d659c1d3993a35 -c 8 -M 8 -- environment --ad-hoc libvirt strace -- strace -o strace.log -- virsh connect qemu:///system
error: failed to connect to the hypervisor
error: Failed to connect socket to 'var/run/libvirt/libvirt-sock': No such file or directory


```

strace shows that it did use the wrong path:

```
  1056  access("var/run/libvirt/virtqemud-sock", F_OK) = -1 ENOENT (No such file or directory)
  1057  access("var/run/libvirt/libvirt-sock", F_OK) = -1 ENOENT (No such file or directory)
```

full strace log is in the attachment
 | | |
 V V V


My guess is that the patch in the commit caused this problem, but I have no ability to fix it.
Please fix it


thanks

qblade
[strace.log (text/plain, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#47541; Package guix. (Thu, 01 Apr 2021 22:06:01 GMT) Full text and rfc822 format available.

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

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: qblade <qblade <at> protonmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 47541 <at> debbugs.gnu.org
Subject: Re: bug#47541: libvirt does not work
Date: Thu, 01 Apr 2021 23:05:19 +0100
[Message part 1 (text/plain, inline)]
Hello!

qblade via Bug reports for GNU Guix writes:

> after this commit, the `virsh` does not work corrent:
>
> ```
> commit 383b02a370252c08eb1d43ac94d659c1d3993a35
> Author: Pierre Langlois <pierre.langlois <at> gmx.com>
> Date:   Sat Mar 20 21:31:22 2021 +0000
>
>     gnu: libvirt: Update to 7.1.0.
>
>     * gnu/packages/virtualization.scm (libvirt): Update to 7.1.0.
>     [source]: Remove libvirt-create-machine-cgroup.patch, add
>     libvirt-do-not-create-var-dirs.patch.
>     [build-system]: Switch to meson-build-system.
>     [arguments]: Use meson-0.55.  Adapt #:configure-flags for meson, there is no
>     need for --docdir anymore.  Remove fix-BOURNE_SHELL-definition phase.  Add
>     fix-sysconfdir-and-localstatedir phase.  Adapt disable-broken-tests to meson.
>     [native-inputs]: Add python-docutils and rpcsvc-proto.
>     * gnu/packages/patches/libvirt-create-machine-cgroup.patch: Delete.
>     * gnu/packages/patches/libvirt-do-not-create-var-dirs.patch: New patch.
>     * gnu/local.mk (dist_patch_DATA): Add new patch, remove the other.
>
>     Signed-off-by: Ludovic Courtès <ludo <at> gnu.org>
>
> ```

Ooh no! Sorry for the breakage!

>
> Command to reproduce wrong:
> ```
> # This is wrong:
> # After commit
> luhux <at> thinkpad-x230 ~ [date: Thu 01 Apr 2021 09:16:37 PM HKT]
> $ GUIX_BUILD_OPTIONS="" guix time-machine --commit=383b02a370252c08eb1d43ac94d659c1d3993a35 -c 8 -M 8 -- environment --ad-hoc libvirt -- virsh connect
>  qemu:///system
> error: failed to connect to the hypervisor
> error: Failed to connect socket to 'var/run/libvirt/libvirt-sock': No such file or directory
>
>
> ```
>
> It uses the wrong path to connect to libvirtd of the current system.

I see, I tried to cover all cases where libvirt would not use the
correct /var and /etc but clearly missed some :-/.

>
> Command to reproduce corrent:
> ```
> # This is corrent:
> # Before commit
>
>
> luhux <at> thinkpad-x230 ~ [date: Thu 01 Apr 2021 09:16:32 PM HKT]
> $ GUIX_BUILD_OPTIONS="" guix time-machine --commit=c536f0b217714917988d2f412999d978c2f2f495 -c 8 -M 8 -- environment --ad-hoc libvirt -- virsh connect qemu:///system
> error: failed to connect to the hypervisor
> error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
> ```
>
> I use strace to create verbose log:
>
>
> ```
> luhux <at> thinkpad-x230 ~ [date: Thu 01 Apr 2021 09:22:18 PM HKT]
> $ GUIX_BUILD_OPTIONS="" guix time-machine --commit=383b02a370252c08eb1d43ac94d659c1d3993a35 -c 8 -M 8 -- environment --ad-hoc libvirt strace -- strace -o strace.log -- virsh connect qemu:///system
> error: failed to connect to the hypervisor
> error: Failed to connect socket to 'var/run/libvirt/libvirt-sock': No such file or directory
>
>
> ```
>
> strace shows that it did use the wrong path:
>
> ```
>   1056  access("var/run/libvirt/virtqemud-sock", F_OK) = -1 ENOENT (No such file or directory)
>   1057  access("var/run/libvirt/libvirt-sock", F_OK) = -1 ENOENT (No such file or directory)
> ```
>
> full strace log is in the attachment
>  | | |
>  V V V
>
>
> My guess is that the patch in the commit caused this problem, but I have no ability to fix it.
> Please fix it

I'll see if I can look into it at the weekend, although I'm not sure
I'll be able to get to it, so in the meantime we should probably just
revert the updates. Thanks a lot for investigating though, I think we
ought to write a system test that uses virsh to connect if that's
possible.

All that being said, I just noticed somebody had already posted an
alternative patch to do the update before I did, maybe that one is
correct! https://issues.guix.gnu.org/46623

Anyways, I'll revert the patches tomorrow unless there are any
objections!

Sorry again,

Pierre
[signature.asc (application/pgp-signature, inline)]

Reply sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
You have taken responsibility. (Fri, 02 Apr 2021 12:08:01 GMT) Full text and rfc822 format available.

Notification sent to qblade <qblade <at> protonmail.com>:
bug acknowledged by developer. (Fri, 02 Apr 2021 12:08:01 GMT) Full text and rfc822 format available.

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

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: qblade <qblade <at> protonmail.com>, 47541-done <at> debbugs.gnu.org
Subject: Re: bug#47541: libvirt does not work
Date: Fri, 02 Apr 2021 13:06:58 +0100
[Message part 1 (text/plain, inline)]
Pierre Langlois writes:

> Hello!

(snip)

> I'll see if I can look into it at the weekend, although I'm not sure
> I'll be able to get to it, so in the meantime we should probably just
> revert the updates. Thanks a lot for investigating though, I think we
> ought to write a system test that uses virsh to connect if that's
> possible.
>
> All that being said, I just noticed somebody had already posted an
> alternative patch to do the update before I did, maybe that one is
> correct! https://issues.guix.gnu.org/46623
>
> Anyways, I'll revert the patches tomorrow unless there are any
> objections!

Ok, I've reverted the update while we work on updating it again, this
time correctly and with a working test :-).

Thanks,
Pierre
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#47541; Package guix. (Fri, 02 Apr 2021 15:17:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: qblade <qblade <at> protonmail.com>, 47541 <at> debbugs.gnu.org
Subject: Re: bug#47541: libvirt does not work
Date: Fri, 02 Apr 2021 17:16:13 +0200
Hi Pierre,

Pierre Langlois <pierre.langlois <at> gmx.com> skribis:

> I'll see if I can look into it at the weekend, although I'm not sure
> I'll be able to get to it, so in the meantime we should probably just
> revert the updates. Thanks a lot for investigating though, I think we
> ought to write a system test that uses virsh to connect if that's
> possible.
>
> All that being said, I just noticed somebody had already posted an
> alternative patch to do the update before I did, maybe that one is
> correct! https://issues.guix.gnu.org/46623
>
> Anyways, I'll revert the patches tomorrow unless there are any
> objections!

It would be best to see how to fix it, but if there’s nothing obvious,
we can revert.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#47541; Package guix. (Fri, 02 Apr 2021 15:35:01 GMT) Full text and rfc822 format available.

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

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>, qblade <qblade <at> protonmail.com>,
 47541 <at> debbugs.gnu.org
Subject: Re: bug#47541: libvirt does not work
Date: Fri, 02 Apr 2021 16:34:32 +0100
[Message part 1 (text/plain, inline)]
Hi Ludo,

Ludovic Courtès writes:

> Hi Pierre,
>
> Pierre Langlois <pierre.langlois <at> gmx.com> skribis:
>
>> I'll see if I can look into it at the weekend, although I'm not sure
>> I'll be able to get to it, so in the meantime we should probably just
>> revert the updates. Thanks a lot for investigating though, I think we
>> ought to write a system test that uses virsh to connect if that's
>> possible.
>>
>> All that being said, I just noticed somebody had already posted an
>> alternative patch to do the update before I did, maybe that one is
>> correct! https://issues.guix.gnu.org/46623
>>
>> Anyways, I'll revert the patches tomorrow unless there are any
>> objections!
>
> It would be best to see how to fix it, but if there’s nothing obvious,
> we can revert.

Yeah, in the end I saw Brice's update patch that I missed from back in
February (oooups!) and that one works just fine! So I've reverted it so
we can go with his approach, I've posted a new series that includes it:
https://issues.guix.gnu.org/46623#6

Thanks,
Pierre
[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, 01 May 2021 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 360 days ago.

Previous Next


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