From: Pierre Langlois <pierre.langlois@gmx.com>
To: qblade <qblade@protonmail.com>
Cc: 47541@debbugs.gnu.org
Subject: bug#47541: libvirt does not work
Date: Thu, 01 Apr 2021 23:05:19 +0100 [thread overview]
Message-ID: <871rbtwti8.fsf@gmx.com> (raw)
In-Reply-To: <FhsbeL1BHR_XS6-TjLxQ8VbYpIq8ngMHr6EPt6-lBw78dwmhxuU8kn_KcDYW-ntg0U4gcvMAQ7ktzE0SxS8s-WYv_BhdqUO6hfwFh7N9Aoo=@protonmail.com>
[-- Attachment #1: Type: text/plain, Size: 3835 bytes --]
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@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@gnu.org>
>
> ```
Ooh no! Sorry for the breakage!
>
> Command to reproduce wrong:
> ```
> # This is wrong:
> # After commit
> luhux@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@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@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]
next prev parent reply other threads:[~2021-04-01 22:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 13:38 libvirt does not work qblade
2021-04-01 22:05 ` Pierre Langlois [this message]
2021-04-02 12:06 ` bug#47541: " Pierre Langlois
2021-04-02 15:16 ` Ludovic Courtès
2021-04-02 15:34 ` Pierre Langlois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871rbtwti8.fsf@gmx.com \
--to=pierre.langlois@gmx.com \
--cc=47541@debbugs.gnu.org \
--cc=qblade@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.