From 9521d830204807802969f070b251e9e856cfdd2308a847181b50f3afb90c1bec Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Wed, 27 Nov 2013 03:04:08 +0000 Subject: [PATCH] - Fix starting of libvirtd when NetworkManager is enabled Modified libvirt-suse-netcontrol.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=331 --- libvirt-suse-netcontrol.patch | 24 ++++++++++++++++++++++-- libvirt.changes | 6 ++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index f316295..9998960 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -134,17 +134,37 @@ Index: libvirt-1.1.4/src/interface/interface_backend_netcf.c static void virNetcfDriverStateDispose(void *obj) -@@ -85,6 +121,10 @@ netcfStateInitialize(bool privileged ATT +@@ -85,7 +121,22 @@ netcfStateInitialize(bool privileged ATT if (!(driverState = virObjectLockableNew(virNetcfDriverStateClass))) return -1; +#ifdef WITH_NETCONTROL + nc_logger_redirect_to(interface_nc_log_driver); -+#endif + /* open netcf */ ++ /* Note: On SUSE, ncf_init will fail if Network Manager is enabled. Ignore ++ * the failure so libvirtd will still start. Connections to the driver will ++ * fail in netcfInterfaceOpen. This restores the behavior before ++ * commit 822fe136. ++ */ ++ if (ncf_init(&driverState->netcf, NULL) != 0) { ++ VIR_WARN("Failed to initialize netcontrol. Continuing with network " ++ "interface management features disabled"); ++ virObjectUnref(driverState); ++ driverState = NULL; ++ } ++#else if (ncf_init(&driverState->netcf, NULL) != 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("failed to initialize netcf")); +@@ -93,6 +144,7 @@ netcfStateInitialize(bool privileged ATT + driverState = NULL; + return -1; + } ++#endif + return 0; + } + Index: libvirt-1.1.4/src/interface/interface_driver.c =================================================================== --- libvirt-1.1.4.orig/src/interface/interface_driver.c diff --git a/libvirt.changes b/libvirt.changes index b12675d..b81d87c 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 26 20:02:48 MST 2013 - jfehlig@suse.com + +- Fix starting of libvirtd when NetworkManager is enabled + Modified libvirt-suse-netcontrol.patch + ------------------------------------------------------------------- Tue Nov 26 14:51:44 MST 2013 - jfehlig@suse.com