[PATCH 0 of 8] This series of patches exposes more errors from libvirt calls

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1235768794 10800 # Node ID 5d628d1be4d7777f8a14d1cc1818dcb26baae857 # Parent ebe6e8f75d1731f7c8d49777db6b547b92944b35 This patch exposes error messages from libvirt calls in Virt_Device.c Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r ebe6e8f75d17 -r 5d628d1be4d7 src/Virt_Device.c --- a/src/Virt_Device.c Thu Feb 19 12:24:12 2009 -0800 +++ b/src/Virt_Device.c Fri Feb 27 18:06:34 2009 -0300 @@ -742,10 +742,11 @@ dom = virDomainLookupByName(conn, domain); if (dom == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "No such instance (no domain for %s)", - name); + virt_set_status(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "No such instance (no domain for %s)", + name); goto err; }

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1235768841 10800 # Node ID b5acbf9fcbba3568fba1f7ce2d721a0886a177ab # Parent 5d628d1be4d7777f8a14d1cc1818dcb26baae857 This patch exposes error messages from libvirt calls in Virt_DevicePool.c Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r 5d628d1be4d7 -r b5acbf9fcbba src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Fri Feb 27 18:06:34 2009 -0300 +++ b/src/Virt_DevicePool.c Fri Feb 27 18:07:21 2009 -0300 @@ -712,9 +712,10 @@ CU_DEBUG("Looking up network `%s'", netname); network = virNetworkLookupByName(conn, netname); if (network == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "No such NetworkPool: %s", netname); + virt_set_status(broker, &s, + CMPI_RC_ERR_FAILED, + conn, + "No such NetworkPool: %s", netname); goto out; } @@ -740,9 +741,10 @@ bridge = virNetworkGetBridgeName(network); if (asprintf(&cap, "Bridge: %s", bridge) == -1) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - ""); + virt_set_status(broker, &s, + CMPI_RC_ERR_FAILED, + conn, + ""); goto out; } @@ -780,9 +782,11 @@ nets = virConnectNumOfNetworks(conn); if (nets < 0) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Unable to list networks"); + virt_set_status(broker, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to list networks"); + goto out; }

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1235768854 10800 # Node ID 26cbb2d7160307834cfa1fb5d77079532e534774 # Parent b5acbf9fcbba3568fba1f7ce2d721a0886a177ab This patch exposes error messages from libvirt calls in VirtualSystemManagementService Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r b5acbf9fcbba -r 26cbb2d71603 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Fri Feb 27 18:07:21 2009 -0300 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Fri Feb 27 18:07:34 2009 -0300 @@ -123,9 +123,10 @@ for (i = 0; i < count; i++) { name = virDomainGetName(list[i]); if (name == NULL) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Unable to get domain names"); + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get domain names"); goto end; } @@ -169,10 +170,11 @@ dom = virDomainLookupByName(conn, name); if (dom == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "No such instance (%s)", - name); + virt_set_status(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "No such instance (%s)", + name); goto out; }

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1235768862 10800 # Node ID 0eb7481830366f10b777b949425e228200935a51 # Parent 26cbb2d7160307834cfa1fb5d77079532e534774 This patch exposes error messages from libvirt calls in Virt_KVMRedirectionSAP Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r 26cbb2d71603 -r 0eb748183036 src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Fri Feb 27 18:07:34 2009 -0300 +++ b/src/Virt_KVMRedirectionSAP.c Fri Feb 27 18:07:42 2009 -0300 @@ -392,17 +392,19 @@ dom = virDomainLookupByName(conn, sys); if (dom == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "No such instance (%s)", - sys); + virt_set_status(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "No such instance (%s)", + sys); goto out; } if (!check_graphics(dom, &dominfo)) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "No console device for this guest"); + virt_set_status(broker, &s, + CMPI_RC_ERR_FAILED, + conn, + "No console device for this guest"); goto out; }

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1235768867 10800 # Node ID b4e20e3062bfca3bdebfd8b74920733927193665 # Parent 0eb7481830366f10b777b949425e228200935a51 This patch exposes error messages from libvirt calls in Virt_RASD.c Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r 0eb748183036 -r b4e20e3062bf src/Virt_RASD.c --- a/src/Virt_RASD.c Fri Feb 27 18:07:42 2009 -0300 +++ b/src/Virt_RASD.c Fri Feb 27 18:07:47 2009 -0300 @@ -115,9 +115,11 @@ dom = virDomainLookupByName(conn, domain); if (dom == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "Domain `%s' not found while getting info", domain); + virt_set_status(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Domain `%s' not found while getting info", + domain); goto out; } @@ -451,10 +453,11 @@ dev = find_dev(conn, type, host, devid); if (!dev) { - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "No such instance (%s)", - name); + virt_set_status(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "No such instance (%s)", + name); goto out; }

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1235768872 10800 # Node ID 2c0bcc9729ec08d18516a8febd1c636bcb0b0dd1 # Parent b4e20e3062bfca3bdebfd8b74920733927193665 This patch exposes error messages from libvirt calls in Virt_SettingsDefineCapabilities.c Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r b4e20e3062bf -r 2c0bcc9729ec src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Fri Feb 27 18:07:47 2009 -0300 +++ b/src/Virt_SettingsDefineCapabilities.c Fri Feb 27 18:07:52 2009 -0300 @@ -453,9 +453,10 @@ rc = virConnectGetVersion(conn, &version); CU_DEBUG("libvir : version=%ld, rc=%d", version, rc); if (rc != 0) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not get xen version"); + virt_set_status(_BROKER, s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get xen version"); goto out; }

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1235768879 10800 # Node ID f88cd8378600ba6a44183cf3f39a9a76c14b930c # Parent 2c0bcc9729ec08d18516a8febd1c636bcb0b0dd1 This patch exposes additional error messages from libvirt calls in Virt_VirtualSystemManagementService * All get_dominfo() calls are considered as targets for error message exposition, since they internally call virDomainGetXMLDesc Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r 2c0bcc9729ec -r f88cd8378600 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Fri Feb 27 18:07:52 2009 -0300 +++ b/src/Virt_VirtualSystemManagementService.c Fri Feb 27 18:07:59 2009 -0300 @@ -1075,9 +1075,10 @@ ret = get_dominfo(dom, domain); if (ret == 0) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Error getting referenced configuration"); + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Error getting referenced configuration"); goto out; } @@ -1334,10 +1335,11 @@ } if (!get_dominfo(dom, &dominfo)) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Unable to find existing domain `%s' to modify", - name); + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to find existing domain `%s' to modify", + name); goto out; } @@ -1721,9 +1723,10 @@ CMPIObjectPath *op; if (!get_dominfo(dom, &dominfo)) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Internal error (getting domain info)"); + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virDomainGetConnect(dom), + "Internal error (getting domain info)"); goto out; }

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1235768886 10800 # Node ID 2424d687cc8e9ff4b198858baa1ea7cbc97c523e # Parent f88cd8378600ba6a44183cf3f39a9a76c14b930c This patch exposes error messages from libvirt calls in Virt_VSSD.c Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r f88cd8378600 -r 2424d687cc8e src/Virt_VSSD.c --- a/src/Virt_VSSD.c Fri Feb 27 18:07:59 2009 -0300 +++ b/src/Virt_VSSD.c Fri Feb 27 18:08:06 2009 -0300 @@ -254,10 +254,11 @@ dom = virDomainLookupByName(conn, name); if (dom == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "No such instance (%s)", - name); + virt_set_status(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "No such instance (%s)", + name); goto out; }
participants (1)
-
Richard Maciel