- 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:
parent
c521110742
commit
9521d83020
@ -134,17 +134,37 @@ Index: libvirt-1.1.4/src/interface/interface_backend_netcf.c
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
virNetcfDriverStateDispose(void *obj)
|
virNetcfDriverStateDispose(void *obj)
|
||||||
@@ -85,6 +121,10 @@ netcfStateInitialize(bool privileged ATT
|
@@ -85,7 +121,22 @@ netcfStateInitialize(bool privileged ATT
|
||||||
if (!(driverState = virObjectLockableNew(virNetcfDriverStateClass)))
|
if (!(driverState = virObjectLockableNew(virNetcfDriverStateClass)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
+#ifdef WITH_NETCONTROL
|
+#ifdef WITH_NETCONTROL
|
||||||
+ nc_logger_redirect_to(interface_nc_log_driver);
|
+ nc_logger_redirect_to(interface_nc_log_driver);
|
||||||
+#endif
|
|
||||||
+
|
+
|
||||||
/* open netcf */
|
/* 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) {
|
if (ncf_init(&driverState->netcf, NULL) != 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
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
|
Index: libvirt-1.1.4/src/interface/interface_driver.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.4.orig/src/interface/interface_driver.c
|
--- libvirt-1.1.4.orig/src/interface/interface_driver.c
|
||||||
|
@ -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
|
Tue Nov 26 14:51:44 MST 2013 - jfehlig@suse.com
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user