[libvirt] [PATCH] esx: Don't ignore the vcenter query parameter

Daniel Veillard veillard at redhat.com
Wed Jul 21 16:02:34 UTC 2010


On Tue, Jul 13, 2010 at 10:51:30PM +0200, Matthias Bolte wrote:
> Since 070f61002f47b602c15d1e4950a122ac9edefe1b the vcenter query
> parameter has been ignored, because the refactoring to use
> esxUtil_ParseQuery was incomplete. This effectively broke migration,
> because the vcenter query parameter is essential for a migration.
> ---
>  src/esx/esx_driver.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
> index acf8908..33f421d 100644
> --- a/src/esx/esx_driver.c
> +++ b/src/esx/esx_driver.c
> @@ -475,11 +475,18 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
>      }
>  
>      /* Login to vCenter */
> -    if (vCenter != NULL) {
> +    if (parsedQuery->vCenter != NULL) {
>          VIR_FREE(url);
>          VIR_FREE(password);
>          VIR_FREE(username);
>  
> +        vCenter = strdup(parsedQuery->vCenter);
> +
> +        if (vCenter == NULL) {
> +            virReportOOMError();
> +            goto cleanup;
> +        }
> +
>          /* If a vCenter is specified resolve the hostname */
>          if (STRNEQ(vCenter, "*") &&
>              esxUtil_ResolveHostname(vCenter, vCenterIpAddress,

  Oops, ACK

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list