WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

RE: [Xen-API] [PATCH] CA-46656: A ha-restart-priority of any valid value

To: Thomas Sanders <thomas.sanders@xxxxxxxxxx>, "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-API] [PATCH] CA-46656: A ha-restart-priority of any valid value means ha-always-run should be set to true when the VM starts
From: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
Date: Wed, 3 Nov 2010 18:13:43 +0000
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Wed, 03 Nov 2010 11:13:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <cdbe193253c8684adf9f.1288798536@thomassa-laptop>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <cdbe193253c8684adf9f.1288798536@thomassa-laptop>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Act7bMk+QcgcosJeTRy5nyuNYebEMwAFf0Mw
Thread-topic: [Xen-API] [PATCH] CA-46656: A ha-restart-priority of any valid value means ha-always-run should be set to true when the VM starts
Aha, another place with a hardcoded "1" :)

Thanks for figuring this out!

Cheers,
Dave

> -----Original Message-----
> From: xen-api-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-api-
> bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas Sanders
> Sent: 03 November 2010 15:36
> To: xen-api@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-API] [PATCH] CA-46656: A ha-restart-priority of any valid
> value means ha-always-run should be set to true when the VM starts
> 
> # HG changeset patch
> # User Thomas Sanders <thomas.sanders@xxxxxxxxxx> # Date 1288798450 0 #
> Node ID cdbe193253c8684adf9fd5a8edf4823c4fbc20b3
> # Parent  fa3a7ba9c89bc875a845aacf1cf362b2369e1b41
> CA-46656: A ha-restart-priority of any valid value means ha-always-run
> should be set to true when the VM starts.
> 
> Signed-off-by: Thomas Sanders <thomas.sanders@xxxxxxxxxx>
> Acked-by: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
> 
> diff --git a/ocaml/xapi/xapi_vm.ml b/ocaml/xapi/xapi_vm.ml
> --- a/ocaml/xapi/xapi_vm.ml
> +++ b/ocaml/xapi/xapi_vm.ml
> @@ -1,5 +1,5 @@
>  (*
> - * Copyright (C) 2006-2009 Citrix Systems Inc.
> + * Copyright (C) 2006-2010 Citrix Systems Inc.
>   *
>   * This program is free software; you can redistribute it and/or
> modify
>   * it under the terms of the GNU Lesser General Public License as
> published @@ -99,7 +99,7 @@ let set_ha_always_run ~__context ~self ~
>  (* GUI not calling this anymore, now used internally in vm.start and
> vm.resume *)  let assert_ha_always_run_is_true ~__context ~vm =
>       let rp = Db.VM.get_ha_restart_priority ~__context ~self:vm in
> -     if (rp = "1" or rp = Constants.ha_restart_best_effort)
> +     if (List.mem rp (Constants.ha_valid_restart_priorities))
>       then set_ha_always_run ~__context ~self:vm ~value:true
>  (* GUI not calling this anymore, now used internally in vm.shutdown
> and vm.suspend *)  let assert_ha_always_run_is_false ~__context ~vm =

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>