[Pacemaker] Resource capacity limit
Andrew Beekhof
andrew at beekhof.net
Thu Nov 5 13:14:42 UTC 2009
On Tue, Nov 3, 2009 at 12:15 PM, Yan Gao <ygao at novell.com> wrote:
> Hi again,
>
> Yan Gao wrote:
>> Hi Lars,
>> Thanks for the great suggestions!
>>
>> Lars Marowsky-Bree wrote:
>>> On 2009-10-30T19:41:35, Yan Gao <ygao at novell.com> wrote:
>>>> Configuration example:
>>>>
>>>> node yingying \
>>>> attributes capacity="100"
>>>> primitive dummy0 ocf:heartbeat:Dummy \
>>>> meta weight="90" priority="2"
>>>> primitive dummy1 ocf:heartbeat:Dummy \
>>>> meta weight="60" priority="1"
>>>> ..
>>>> property $id="cib-bootstrap-options" \
>>>> limit-capacity="true"
>>> First, I would prefer not to contaminate the regular node attribute
>>> namespace; the word "capacity" might already be used. Second, the
>>> "weight" is just one dimension, which is somewhat difficult.
>>>
>>> I'd propose to introduce a new XML element, "resource_utilization" (name
>>> to be decided ;-) containing a "nvset", and which can be used in a node
>>> element or a resource primitive.
>>>
>>> This creates a new namespace, avoiding clashes, and distinguishes the
>>> utilization parameters from the other various attributes.
>>>
>>> Further, it trivially allows for several user-defined metrics.
>> Right, great idea! I'll try to implement it if Andrew is OK with that either:)
>>
> Done and attached.
>
> XML sample:
> ..
> <nodes>
> <node id="yingying" type="normal" uname="yingying">
> <utilization id="nodes-yingying-utilization">
> <nvpair id="nodes-yingying-memory" name="memory" value="150"/>
> <nvpair id="nodes-yingying-cpu" name="cpu" value="1"/>
> </utilization>
> </node>
> </nodes>
> ..
> <resources>
> <primitive class="ocf" id="Dummy0" provider="heartbeat" type="Dummy">
> <utilization id="Dummy0-utilization">
> <nvpair id="Dummy0-utilization-memory" name="memory" value="90"/>
> <nvpair id="Dummy0-utilization-cpu" name="cpu" value="1"/>
> </utilization>
> </primitive>
> <primitive class="ocf" id="Dummy1" provider="heartbeat" type="Dummy">
> <utilization id="Dummy1-utilization">
> <nvpair id="Dummy1-utilization-memory" name="memory" value="60"/>
> <nvpair id="Dummy1-utilization-cpu" name="cpu" value="1"/>
> </utilization>
> </primitive>
> </resources>
> ..
>
> Please kindly review it...
> Any suggestions are appreciated!
Whats the behavior if a node has either no utilization block or no
value for that attribute?
Can a resource with a utilization block still be placed there?
/me goes off to read the patch
More information about the Pacemaker
mailing list