Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: HA-WG-Technical
Re: Two git patchs for resource-agents
 

Index | Next | Previous | View Flat


lmb at suse

Jul 12, 2011, 4:51 AM


Views: 2619
Permalink
Re: Two git patchs for resource-agents [In reply to]

On 2011-07-11T05:01:23, John Shi <jshi [at] novell> wrote:

> +<content type="boolean" default="$OCF_RESKEY_dynamic" />

You can't put a shell variable as a value here.

> +<parameter name="pidfile" unique="0" required="0">
> +<longdesc lang="en">PID file</longdesc>
> +<shortdesc lang="en">PID file</shortdesc>
> +<content type="string" default="$OCF_RESKEY_pidfile" />

Why can this be configured? Is this necessary?


> +set_utilization() {
> + host_name="$(hostname)"
> +
> + if [ "$OCF_RESKEY_utilization_cpu" = "true" -o "$OCF_RESKEY_utilization_cpu" = "1" ]; then
> + sys_cpu=$(grep -c processor /proc/cpuinfo)
> + uti_cpu=$(crm_attribute -Q -t nodes -U "$host_name" -z -n cpu 2>/dev/null)

This counts just the number of cores; I think it should be multiplied by
their frequency. That's still only an approximation (and doesn't really
compare across differently powerful CPU architectures), but it is more
meaningful I think.

Probably this is one of the areas where we will need to have multiple
algorithms to choose from.


> + if [ "$OCF_RESKEY_utilization_memory" = "true" -o "$OCF_RESKEY_utilization_memory" = "1" ]; then
> + sys_mem=$(awk '/MemTotal/{printf("%d\n",$2/1024);exit(0)}' /proc/meminfo)
> + uti_mem=$(crm_attribute -Q -t nodes -U "$host_name" -z -n memory 2>/dev/null)

Here we need the ability to reduce this number by a configurable amount
(to account for the HVM domain/Dom0, for example).


> +<parameter name="set_utilization_cpu" unique="0" required="0">
> +<longdesc lang="en">Enable setting cpu of utilization.</longdesc>
> +<shortdesc lang="en">Enable setting cpu of utilization</shortdesc>
> +<content type="boolean" default="$OCF_RESKEY_set_utilization_cpu" />
> +</parameter>
> +
> +<parameter name="set_utilization_memory" unique="0" required="0">
> +<longdesc lang="en">Enable setting memory of utilization.</longdesc>
> +<shortdesc lang="en">Enable setting memory of utilization</shortdesc>
> +<content type="boolean" default="$OCF_RESKEY_set_utilization_memory" />
> +</parameter>

For these, we also need the ability to specify a multiplier; that would
allow one to configure VMs with a "overcommit" factor, which I'm quite
sure a number of customers would want ...


Thanks,
Lars

--
Architect Storage/HA, OPS Engineering, Novell, Inc.
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde

_______________________________________________
ha-wg-technical mailing list
ha-wg-technical [at] lists
https://lists.linux-foundation.org/mailman/listinfo/ha-wg-technical

Subject User Time
Two git patchs for resource-agents jshi at novell Jul 11, 2011, 4:01 AM
    Re: Two git patchs for resource-agents lmb at suse Jul 12, 2011, 4:51 AM
        Re: Two git patchs for resource-agents andrew at beekhof Jul 12, 2011, 10:00 PM
    Re: Two git patchs for resource-agents xwhu at novell Jul 13, 2011, 3:09 AM
    Re: Two git patchs for resource-agents lmb at suse Jul 13, 2011, 3:16 AM
    Re: Two git patchs for resource-agents lmb at suse Jul 13, 2011, 5:37 AM
    Re: Two git patchs for resource-agents jshi at novell Jul 13, 2011, 9:56 PM
    Re: Two git patchs for resource-agents lmb at suse Jul 22, 2011, 4:38 AM
    Re: Two git patchs for resource-agents jshi at novell Aug 12, 2011, 11:56 AM
    Re: Two git patchs for resource-agents jshi at novell Aug 17, 2011, 11:20 PM
    Re: Two git patchs for resource-agents dejan at suse Aug 19, 2011, 5:18 AM
        Re: Two git patchs for resource-agents jshi at suse Oct 28, 2011, 7:21 AM
    Re: Two git patchs for resource-agents dejan at suse Oct 28, 2011, 7:39 AM
        Re: Two git patchs for resource-agents jshi at suse Nov 1, 2011, 3:46 AM
    Re: Two git patchs for resource-agents dejan at suse Nov 6, 2011, 2:09 PM
    Re: Two git patchs for resource-agents dejan at suse Nov 8, 2011, 9:07 AM
    Re: Two git patchs for resource-agents jshi at suse Nov 11, 2011, 5:00 AM
    Re: Two git patchs for resource-agents dejan at suse Nov 15, 2011, 7:04 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.