- 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
This commit is contained in:
James Fehlig 2013-11-27 03:04:08 +00:00 committed by Git OBS Bridge
parent c521110742
commit 9521d83020
2 changed files with 28 additions and 2 deletions

View File

@ -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

View File

@ -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