On Thu, May 21, 2009 at 2:52 PM, Iustin Pop <[email protected]> wrote:
> You can't override it in any way today.
>
Oh, ok, I thought so!!
> You mean:
>
> diff --git a/lib/cmdlib.py b/lib/cmdlib.py
> index 5f55173..efcea75 100644
> --- a/lib/cmdlib.py
> +++ b/lib/cmdlib.py
> @@ -3537,11 +3537,17 @@ class LUFailoverInstance(LogicalUnit):
> _CheckNodeOnline(self, target_node)
> _CheckNodeNotDrained(self, target_node)
>
> - if instance.admin_up:
> - # check memory requirements on the secondary node
> + # check memory requirements on the secondary node
> + try:
> _CheckNodeFreeMemory(self, target_node, "failing over instance %s" %
> instance.name, bep[constants.BE_MEMORY],
> instance.hypervisor)
> + except errors.OpPrereqError, err:
> + if instance.admin_up:
> + raise
> + else:
> + self.proc.LogWarning("Error while checking memory on secondary node:"
> + " %s", str(err))
>
> # check bridge existance
> brlist = [nic.bridge for nic in instance.nics]
>
> It's doable, but not nice. I would rather (as I wanted initially) add a
> separate flag --no-mem-check or --no-check or --no-start.
>
You're right, not so clean... Well, we could pass the value of the
force flag to the _Check function, or yes, another flag can be added
but is it really needed?
Guido