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] XCP BETA BUG: memory limits error

To: George Shuklin <george.shuklin@xxxxxxxxx>
Subject: Re: [Xen-API] XCP BETA BUG: memory limits error
From: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
Date: Mon, 19 Sep 2011 14:11:28 +0100
Cc: "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 19 Sep 2011 06:08:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1316436591.22917.1.camel@X220>
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: <1316436591.22917.1.camel@X220>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
On Mon, Sep 19, 2011 at 01:49:51PM +0100, George Shuklin wrote:
> xe vm-memory-limits-set uuid=any dynamic-min=128MiB dynamic-max=256MiB
> static-min=128MiB static-max=256MiB
> Error code: MEMORY_CONSTRAINT_VIOLATION
> Error parameters: Memory limits must satisfy: static_min ≤ dynamic_min =
> dynamic_max = static_max

Normally, we would expect Xapi to apply the following constraint:

        static_min <= dynamic_min <= dynamic_max <= static_max

However, when the DMC feature flag is missing, Xapi instead applies
the following constraint:

        static_min <= dynamic_min = dynamic_max = static_max

The following code checks for the DMC feature flag, and chooses the
more restrictive constraint if the feature flag is not present:

https://github.com/xen-org/xen-api/blob/master/ocaml/xapi/xapi_vm_memory_constraints.ml
let assert_valid_and_pinned_at_static_max ~constraints =
        if not (are_valid_and_pinned_at_static_max ~constraints)
        then raise (Api_errors.Server_error (
                Api_errors.memory_constraint_violation,
                        ["Memory limits must satisfy: \
                        static_min ≤ dynamic_min = dynamic_max = static_max"]))

let assert_valid_for_current_context ~__context ~vm ~constraints =
        (if Db.VM.get_is_control_domain ~__context
                        ~self:vm || (Pool_features.is_enabled ~__context 
Features.DMC)
                then assert_valid
                else assert_valid_and_pinned_at_static_max)
        ~constraints

So, to solve this problem, it's necessary to find out why the
DMC feature flag is not being set.

Cheers,
Jonathan

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

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