unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57272: libvirt 8.6 fails to start network
@ 2022-08-18  8:11 Lars-Dominik Braun
  2022-08-29 19:17 ` Marius Bakke
  0 siblings, 1 reply; 2+ messages in thread
From: Lars-Dominik Braun @ 2022-08-18  8:11 UTC (permalink / raw)
  To: 57272; +Cc: Marius Bakke

Hi,

after the update to libvirt 8.6.0 in
3a76c2bfd94557c9776aa11240fec14580aec1b0 networks don’t start any more:

    > LANG=C virsh net-start default
    error: Failed to start network default
    error: Unable to find 'dnsmasq' binary in $PATH: No such file or directory

I tried to patch dnsmasq’s path like follows, but then the testcase
networkxml2conftest fails and cannot find dnsmasq either.

---snip---
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index d451b8529e..89507774cb 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1311,6 +1311,12 @@ (define-public libvirt
               (substitute* "scripts/meson-install-dirs.py"
                 (("destdir = .*")
                  "destdir = '/tmp'"))))
+          (add-after 'unpack 'fix-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((dnsmasq (search-input-file inputs "sbin/dnsmasq")))
+                (substitute* "src/util/virdnsmasq.c"
+                  (("#define DNSMASQ \"dnsmasq\"")
+                   (string-append "#define DNSMASQ \"" dnsmasq "\""))))))
           (add-before 'configure 'disable-broken-tests
             (lambda _
               (let ((tests (list "commandtest"         ; hangs idly
---snap---

I’m not sure what the problem might be.

Lars





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#57272: libvirt 8.6 fails to start network
  2022-08-18  8:11 bug#57272: libvirt 8.6 fails to start network Lars-Dominik Braun
@ 2022-08-29 19:17 ` Marius Bakke
  0 siblings, 0 replies; 2+ messages in thread
From: Marius Bakke @ 2022-08-29 19:17 UTC (permalink / raw)
  To: Lars-Dominik Braun, 57272-done

[-- Attachment #1: Type: text/plain, Size: 2656 bytes --]

Hi, thanks for the bug report, and sorry for the breakage.

Lars-Dominik Braun <lars@6xq.net> skriver:

> Hi,
>
> after the update to libvirt 8.6.0 in
> 3a76c2bfd94557c9776aa11240fec14580aec1b0 networks don’t start any more:
>
>     > LANG=C virsh net-start default
>     error: Failed to start network default
>     error: Unable to find 'dnsmasq' binary in $PATH: No such file or directory
>
> I tried to patch dnsmasq’s path like follows, but then the testcase
> networkxml2conftest fails and cannot find dnsmasq either.

I don't understand why that test is failing with your patch.  It has a
hard coded "/usr/sbin/dnsmasq", but patching that does not make a
difference.  It seems the lookup via virFindFileInPath, which ultimately
calls out to GLib's g_find_program_in_path, fails; but ostensibly using
an absolute file name should not make a difference[0].

  [0]: https://docs.gtk.org/glib/func.find_program_in_path.html

Anyway, I was able to reproduce the failure in the system test:

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm
index 4bd56e5d9d..557f30db4f 100644
--- a/gnu/tests/virtualization.scm
+++ b/gnu/tests/virtualization.scm
@@ -106,6 +106,26 @@ (define marionette
                          "-c" "qemu:///system" "connect"))
              marionette))
 
+          (test-eq "create default network"
+            0
+            (marionette-eval
+             '(begin
+                (chdir "/tmp")
+                (system* #$(file-append libvirt "/bin/virsh")
+                         "-c" "qemu:///system" "net-define"
+                         #$(file-append libvirt
+                                        "/etc/libvirt/qemu/networks/default.xml")))
+             marionette))
+
+          (test-eq "start default network"
+            0
+            (marionette-eval
+             '(begin
+                (chdir "/tmp")
+                (system* #$(file-append libvirt "/bin/virsh")
+                         "-c" "qemu:///system" "net-start" "default"))
+             marionette))
+
           (test-end))))
 
   (gexp->derivation "libvirt-test" test))
--8<---------------cut here---------------end--------------->8---

And can confirm your patch fixes that, which is arguably more important.
So I went ahead and committed your patch (and disabled the failing
test), and the system test to avoid future regressions in this area.

Fixed in:

  acbf2f9def gnu: libvirt: Use absolute dnsmasq.
  3e0abde17b tests: libvirt: Ensure the default network can be started.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-29 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18  8:11 bug#57272: libvirt 8.6 fails to start network Lars-Dominik Braun
2022-08-29 19:17 ` Marius Bakke

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).