[ClusterLabs] Cluster resources migration from CMAN to Pacemaker

Jan Pokorný jpokorny at redhat.com
Wed Jan 27 13:41:39 EST 2016

On 27/01/16 11:04 -0600, Ken Gaillot wrote:
> On 01/27/2016 02:34 AM, jaspal singla wrote:
>> I have couple of concerns more to answer, please help!
> I'm not familiar with rgmanager, so there may be better ways that
> hopefully someone else can suggest, but here are some ideas off the top
> of my head:
>> 1) In CMAN, there was meta attribute - autostart=0 (This parameter disables
>> the start of all services when RGManager starts). Is there any way for such
>> behavior in Pacemaker?

Please be more careful about the descriptions; autostart=0 specified
at the given resource group ("service" or "vm" tag) means just not to
start anything contained in this very one automatically (also upon
new resources being defined, IIUIC), definitely not "all services".

Note that "service" in the RGManager's view != service as perceived by
common *nix user (that would be just "resource" or "script resource"
in particular there).  I know, it's confusing, hence the context and
clarity is important.

>> I tried to explore is-manged=0 but when I start the cluster through pcs
>> cluster start OR pcs cluster start --all, my all of the resources gets
>> started (even the one which has meta attribute configured as
>> is-managed=false). Any clue to achieve  such behavior?
>> What does is-manged=false do?
> Any service with is-managed=false should not be started or stopped by
> the cluster. If they are already running, they should be left running;
> if they are stopped, they should be left stopped.
> I'm not sure why it didn't work in your test; maybe attach the output of
> "pcs cluster cib" and "pcs status" with the setting in effect.

I was looking at this and resources/groups with is-managed=false
should not be started automatically by Pacemaker.

Requested details would help us identify the issue.

However, there is an apparent problem in case you run the suggested
recipe command-by-command without accumulating the changes before the
final configuration handover to the cluster
(pcs cib tmp.xml; pcs -f tmp.xml ... [; ...] ; pcs cib-push tmp.xml)
but performing direct changes on the live cluster instead.

Following output of "clufter ccs2pcscmd --tmp-cib '' ... cluster.conf"
is therefore strongly discouraged as it is akin to the latter approach
(would define -- and start -- the resource, which only later would
get marked as unmanaged, but it was started in the interim ... oops).

> I don't think there's any exact replacement for autostart in pacemaker.
> Probably the closest is to set target-role=Stopped before stopping the
> cluster, and set target-role=Started when services are desired to be
> started.

For groups, the same problem arises with each pcs commands committed
separately, but the target state is, at least, what was originally
intended (resource [eventually] stopped until told otherwise).
In that light, I will likely exchange is-managed=false for
target-role=Stopped (pcs resource unmanage -> disable).

>> 2) Please put some alternatives to exclusive=0 and __independent_subtree?
>> what we have in Pacemaker instead of these?
> My first though for exclusive=0 would be to configure negative
> colocation constraints between that resource and all other resources.
> For example:
>   pcs constraint colocation add A with B "-INFINITY"
> says that A should never run on a node where B is running (B is unaffected).

First, we are talking about exclusive=1 (again, clarity is damn

Yes, this is one of the approaches.  It doesn't really scale, you and
possibly Pacemaker will spend plenty of cycles to grasp what's going on
in the config, and most importantly, you will have problems managing
these wires by hand.

The other approach would be to rely on utilization: "exclusive"
resources declared to eat up all the resources of a single node.
But then, you cannot group/collocate such a resource (note that
you cannot set utilization for the whole group collectively),
so again, not a versatile solution.

--> clufter currently refuses to convert configs when it spots
    this "exclusive" property.

If there's anything better please let me know.

Jan (Poki)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20160127/e673149f/attachment-0003.sig>

More information about the Users mailing list