Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 885882 Details for
Bug 1084702
XML error: bond interface misses the bond element
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
FC20 dump inactive xml and Introduce netcfInterfaceObjIsActive
dump-inactive-xml-when-interface-isnt-active.patch (text/plain), 4.30 KB, created by
kubrick@fgv6.net
on 2014-04-13 12:35:01 UTC
(
hide
)
Description:
FC20 dump inactive xml and Introduce netcfInterfaceObjIsActive
Filename:
MIME Type:
Creator:
kubrick@fgv6.net
Created:
2014-04-13 12:35:01 UTC
Size:
4.30 KB
patch
obsolete
>diff -Naur libvirt-1.1.3.4-orig/src/interface/interface_backend_netcf.c libvirt-1.1.3.4/src/interface/interface_backend_netcf.c >--- libvirt-1.1.3.4-orig/src/interface/interface_backend_netcf.c 2014-02-18 22:56:09.000000000 +0000 >+++ libvirt-1.1.3.4/src/interface/interface_backend_netcf.c 2014-04-13 12:57:52.762495012 +0100 >@@ -241,6 +241,32 @@ > return iface; > } > >+static int >+netcfInterfaceObjIsActive(struct netcf_if *iface, >+ bool *active) >+{ >+ int ret = -1; >+ unsigned int flags = 0; >+ >+ virObjectRef(driverState); >+ if (ncf_if_status(iface, &flags) < 0) { >+ const char *errmsg, *details; >+ int errcode = ncf_error(driverState->netcf, &errmsg, &details); >+ virReportError(netcf_to_vir_err(errcode), >+ _("failed to get status of interface %s: %s%s%s"), >+ ncf_if_name(iface), errmsg, details ? " - " : "", >+ details ? details : ""); >+ goto cleanup; >+ } >+ >+ *active = flags & NETCF_IFACE_ACTIVE; >+ ret = 0; >+ >+ cleanup: >+ virObjectUnref(driverState); >+ return ret; >+} >+ > static virDrvOpenStatus > netcfInterfaceOpen(virConnectPtr conn, > virConnectAuthPtr auth ATTRIBUTE_UNUSED, >@@ -542,7 +568,7 @@ > struct netcf_if *iface = NULL; > virInterfacePtr *tmp_iface_objs = NULL; > virInterfacePtr iface_obj = NULL; >- unsigned int status; >+ bool active; > int niface_objs = 0; > int ret = -1; > char **names = NULL; >@@ -614,15 +640,8 @@ > } > } > >- if (ncf_if_status(iface, &status) < 0) { >- const char *errmsg, *details; >- int errcode = ncf_error(driver->netcf, &errmsg, &details); >- virReportError(netcf_to_vir_err(errcode), >- _("failed to get status of interface %s: %s%s%s"), >- names[i], errmsg, details ? " - " : "", >- details ? details : ""); >+ if (netcfInterfaceObjIsActive(iface, &active) < 0) > goto cleanup; >- } > > if (!(def = netcfGetMinimalDefForDevice(iface))) > goto cleanup; >@@ -639,10 +658,8 @@ > * except active|inactive are supported. > */ > if (MATCH(VIR_CONNECT_LIST_INTERFACES_FILTERS_ACTIVE) && >- !((MATCH(VIR_CONNECT_LIST_INTERFACES_ACTIVE) && >- (status & NETCF_IFACE_ACTIVE)) || >- (MATCH(VIR_CONNECT_LIST_INTERFACES_INACTIVE) && >- (status & NETCF_IFACE_INACTIVE)))) { >+ !((MATCH(VIR_CONNECT_LIST_INTERFACES_ACTIVE) && active) || >+ (MATCH(VIR_CONNECT_LIST_INTERFACES_INACTIVE) && !active))) { > ncf_if_free(iface); > iface = NULL; > continue; >@@ -785,6 +802,7 @@ > char *xmlstr = NULL; > virInterfaceDefPtr ifacedef = NULL; > char *ret = NULL; >+ bool active; > > virCheckFlags(VIR_INTERFACE_XML_INACTIVE, NULL); > >@@ -796,7 +814,10 @@ > goto cleanup; > } > >- if ((flags & VIR_INTERFACE_XML_INACTIVE)) { >+ if (netcfInterfaceObjIsActive(iface, &active) < 0) >+ goto cleanup; >+ >+ if ((flags & VIR_INTERFACE_XML_INACTIVE) || !active) { > xmlstr = ncf_if_xml_desc(iface); > } else { > xmlstr = ncf_if_xml_state(iface); >@@ -1013,9 +1034,9 @@ > { > virNetcfDriverStatePtr driver = ifinfo->conn->interfacePrivateData; > struct netcf_if *iface = NULL; >- unsigned int flags = 0; > virInterfaceDefPtr def = NULL; > int ret = -1; >+ bool active; > > virObjectLock(driver); > >@@ -1025,24 +1046,16 @@ > goto cleanup; > } > >- > if (!(def = netcfGetMinimalDefForDevice(iface))) > goto cleanup; > > if (virInterfaceIsActiveEnsureACL(ifinfo->conn, def) < 0) > goto cleanup; > >- if (ncf_if_status(iface, &flags) < 0) { >- const char *errmsg, *details; >- int errcode = ncf_error(driver->netcf, &errmsg, &details); >- virReportError(netcf_to_vir_err(errcode), >- _("failed to get status of interface %s: %s%s%s"), >- ifinfo->name, errmsg, details ? " - " : "", >- details ? details : ""); >- goto cleanup; >- } >+ if (netcfInterfaceObjIsActive(iface, &active) < 0) >+ goto cleanup; > >- ret = flags & NETCF_IFACE_ACTIVE ? 1 : 0; >+ ret = active ? 1 : 0; > > cleanup: > ncf_if_free(iface);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1084702
: 885882