[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] Is DBus a hard dependency



Hi,
currently running libvirtd without DBus fails due to:

error : nwfilterDriverStartup:208 : DBus matches could not be installed. Disabling nwfilter driver
error : virDBusGetSystemBus:77 : internal error Unable to get DBus system bus connection: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
error : virStateInitialize:810 : Initialization of NWFilter state driver failed
error : daemonRunStateInit:784 : Driver state initialization failed

because we fail driver initialization hard in nwfilter_driver.c:

    if (nwfilterDriverInstallDBusMatches(sysbus) < 0) {
        VIR_ERROR(_("DBus matches could not be installed. Disabling nwfilter "
                  "driver"));
        /*
         * unfortunately this is fatal since virNWFilterTechDriversInit
         * may have caused the ebiptables driver to use the firewall tool
         * but now that the watches don't work, we just disable the nwfilter
         * driver
         */
        goto error;
    }

I wonder if this on prupose or if we can just make this a soft error and
go on without DBus? At least in the !HAVE_FIREWALLD case it should be
o.k. to continue. Shouldn't it? See attached patch.
Cheers,
 -- Guido
>From 22571860568bfe8026e60dcede8f332ec6fd002f Mon Sep 17 00:00:00 2001
Message-Id: <22571860568bfe8026e60dcede8f332ec6fd002f 1353774807 git agx sigxcpu org>
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx sigxcpu org>
Date: Sat, 24 Nov 2012 17:32:59 +0100
Subject: [PATCH] nwfilter: Allow DBus initialization to fail
To: libvir-list redhat com

in case we don't use firewalld. This allows us to run without
DBus on servers.
---
 src/nwfilter/nwfilter_driver.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index 12f47ef..e4f6ec9 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -204,6 +204,7 @@ nwfilterDriverStartup(int privileged)
      * initializing
      */
     if (nwfilterDriverInstallDBusMatches(sysbus) < 0) {
+#if HAVE_FIREWALLD
         VIR_ERROR(_("DBus matches could not be installed. Disabling nwfilter "
                   "driver"));
         /*
@@ -213,6 +214,7 @@ nwfilterDriverStartup(int privileged)
          * driver
          */
         goto error;
+#endif
     }
 
     if (privileged) {
-- 
1.7.10.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]