Accepting request 293121 from Virtualization

1

OBS-URL: https://build.opensuse.org/request/show/293121
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=174
This commit is contained in:
Dominique Leuenberger 2015-03-27 08:40:32 +00:00 committed by Git OBS Bridge
commit c062f64bcf
2 changed files with 27 additions and 0 deletions

View File

@ -145,6 +145,26 @@ Index: libvirt-1.2.13/src/interface/interface_backend_netcf.c
/* open netcf */
if (ncf_init(&driver->netcf, NULL) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -1146,6 +1186,19 @@ static virStateDriver interfaceStateDriv
int netcfIfaceRegister(void)
{
+ struct netcf *netcf;
+
+ /* Initialization of libnetcontrol will fail if NetworkManager is enabled.
+ * Skip registration if ncf_init fails.
+ * TODO: finer-grained check? E.g. is_nm_enabled()
+ */
+ if (ncf_init(&netcf, NULL) != 0) {
+ VIR_WARN("Failed to intialize libnetcontrol. Management of interface devices is disabled");
+ return 0;
+ }
+
+ ncf_close(netcf);
+
if (virSetSharedInterfaceDriver(&interfaceDriver) < 0)
return -1;
if (virRegisterStateDriver(&interfaceStateDriver) < 0)
Index: libvirt-1.2.13/src/interface/interface_driver.c
===================================================================
--- libvirt-1.2.13.orig/src/interface/interface_driver.c

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Mar 25 09:10:46 MDT 2015 - jfehlig@suse.com
- Disable interface driver if libnetcontrol cannot be initialized
Modified libvirt-suse-netcontrol.patch
boo#920551
-------------------------------------------------------------------
Mon Mar 16 17:17:49 MDT 2015 - jfehlig@suse.com