[libvirt] [PATCH v2] esx: Add the actual product version to the error message.
Peter Krempa
pkrempa at redhat.com
Mon Sep 8 13:39:16 UTC 2014
On 09/08/14 15:37, Richard W.M. Jones wrote:
> Really this should be a warning, not an error, but at least let's
> print out the product version so we have a hope of diagnosing the
> problem.
>
> error: internal error: v2v-vcenter is neither an ESX 3.5, 4.x nor 5.x host (product version = 0x40007)
>
> In this instance the error was that you have to use 'vpx://'
> instead of 'esx://'.
> ---
> src/esx/esx_driver.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
> index f0a5278..05089e4 100644
> --- a/src/esx/esx_driver.c
> +++ b/src/esx/esx_driver.c
> @@ -703,8 +703,8 @@ esxConnectToHost(esxPrivate *priv,
> priv->host->productVersion != esxVI_ProductVersion_ESX51 &&
> priv->host->productVersion != esxVI_ProductVersion_ESX5x) {
> virReportError(VIR_ERR_INTERNAL_ERROR,
> - _("%s is neither an ESX 3.5, 4.x nor 5.x host"),
> - conn->uri->server);
> + _("%s is neither an ESX 3.5, 4.x nor 5.x host (product version = 0x%x)"),
> + conn->uri->server, priv->host->productVersion);
> goto cleanup;
> }
> } else { /* GSX */
> @@ -822,8 +822,8 @@ esxConnectToVCenter(esxPrivate *priv,
> priv->vCenter->productVersion != esxVI_ProductVersion_VPX51 &&
> priv->vCenter->productVersion != esxVI_ProductVersion_VPX5x) {
> virReportError(VIR_ERR_INTERNAL_ERROR,
> - _("%s is neither a vCenter 2.5, 4.x nor 5.x server"),
> - hostname);
> + _("%s is neither a vCenter 2.5, 4.x nor 5.x server (product version = 0x%x)"),
> + hostname, priv->vCenter->productVersion);
> goto cleanup;
> }
>
>
V1 review applies to this one too.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140908/84a40ec6/attachment-0001.sig>
More information about the libvir-list
mailing list