[ClusterLabs] Live migrate a VM in a cluster group

Andrei Borzenkov arvidjaar at gmail.com
Tue May 29 13:02:48 EDT 2018


28.05.2018 14:44, Jason Gauthier пишет:
> On Mon, May 28, 2018 at 12:03 AM, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
>> 28.05.2018 05:50, Jason Gauthier пишет:
>>> Greetings,
>>>
>>>  I've set up a cluster intended for VMs.  I created a VM, and have
>>> been pretty pleased with migrating it back and forth between the two
>>> nodes.  Now, I am also using the VNC console, which requires listening
>>> on port 59xx.  Of course, once the machine is migrated the IP to
>>> access the VNC console is different.
>>> So, I thought I would be clever and create a cluster IP address.  I
>>> did, and as a stand alone resource it migrates between nodes
>>> perfectly.  I then put these two primitives into a group.
>>>
>>> When I try to migrate the group nothing happens.
>>> There aren't any cluster errors, and the logs do not give me any kind
>>> of indication of error either.
>>>
>>
>> "migrate" is ambiguous here - it may mean moving resource or
>> live-migrating VM. Show exact command(s) you use and logs related to
>> theses commands.
>>
> Sure, okay.  The command I am using is this:
> # crm resource migrate g_Calibre alpha
> 

OK, that is "resource move" which simply creates constraint and relies
on policy engine to compute new resource placement. It does *not* remove
any constraint created previously by "crm resource move" with another
node as argument.
...
> May 28 07:42:32 [5086] alpha    pengine:     info:
> determine_op_status: Operation monitor found resource p_CalibreVNC
> active on beta
> May 28 07:42:32 [5086] alpha    pengine:     info:
> determine_op_status: Operation monitor found resource p_Calibre active
> on beta

Currently both resources are active on beta.

...
> May 28 07:42:32 [5086] alpha    pengine:     info: LogActions:  Leave
>  p_CalibreVNC    (Started beta)
> May 28 07:42:32 [5086] alpha    pengine:     info: LogActions:  Leave
>  p_Calibre       (Started beta)

And policy engine decides to leave it there.
...

>>>
>>> group g_Calibre p_CalibreVNC p_Calibre \
>>>         meta target-role=Started
>>>
>>> location cli-prefer-g_Calibre g_Calibre role=Started inf: alpha
>>> location cli-prefer-p_Calibre p_Calibre role=Started inf: beta
>>> location cli-prefer-p_CalibreVNC p_CalibreVNC role=Started inf: beta
>>>

You have mutually contradictory constraints. Apparently the one for
"beta" is result of previous "crm resource move p_Calibre(VNC) beta"
invocation. At this point pacemaker is actually free to select any node.
I suppose there are some implementation defined behavior but
fundamentally it is garbage in, garbage out. It decided to leave
resources where they are.

After any "crm resource move|migrate|ban" you *MUST* remove constraints
using e.g. "crm resource clear". You can set constraint lifetime so it
is done automatically.



More information about the Users mailing list