[ClusterLabs] Colocation by Node

Andrei Borzenkov arvidjaar at gmail.com
Tue Oct 2 15:03:31 EDT 2018


01.10.2018 18:09, Marc Smith пишет:
> Hi,
> 
> I'm looking for the correct constraint setup to use for the following
> resource configuration:
> --snip--
> node 1: tgtnode2.parodyne.com
> node 2: tgtnode1.parodyne.com
> primitive p_iscsi_tgtnode1 iscsi \
>         params portal=172.16.0.12 target=tgtnode2_redirect udev=no
> try_recovery=true \
>         op start interval=0 timeout=120 \
>         op stop interval=0 timeout=120 \
>         op monitor interval=120 timeout=30
> primitive p_iscsi_tgtnode2 iscsi \
>         params portal=172.16.0.11 target=tgtnode1_redirect udev=no
> try_recovery=true \
>         op start interval=0 timeout=120 \
>         op stop interval=0 timeout=120 \
>         op monitor interval=120 timeout=30
> primitive p_scst ocf:esos:scst \
>         params alua=false \
>         op start interval=0 timeout=120 \
>         op stop interval=0 timeout=90 \
>         op monitor interval=30 timeout=60
> clone clone_scst p_scst \
>         meta interleave=true target-role=Started
> location l_iscsi_tgtnode1 p_iscsi_tgtnode1 role=Started -inf:
> tgtnode2.parodyne.com
> location l_iscsi_tgtnode2 p_iscsi_tgtnode2 role=Started -inf:
> tgtnode1.parodyne.com
> property cib-bootstrap-options: \
>         have-watchdog=false \
>         dc-version=1.1.16-94ff4df \
>         cluster-infrastructure=corosync \
>         stonith-enabled=false \
>         cluster-name=redirect_test \
>         last-lrm-refresh=1538405190
> --snip--
> 
> The gist of it is the 'ocf:esos:scst' provides an iSCSI target interface
> that each opposing node connects to (just a two node cluster) via
> 'ocf:heartbeat:iscsi' on each node. I have location constraints in the
> above configuration that force the "p_iscsi_tgtnode1" and
> "p_iscsi_tgtnode2" primitives to the correct node, but what I'm lacking is
> a colocation constraint that prevents "p_iscsi_tgtnode1" from starting
> unless "clone_scst" is running on the opposing node and vice versa.
> 
> Is a configuration like this possible? Without creating two primitives for
> 'ocf:esos:scst' and ditching the clone rule? 

Even assuming you can add constraint against clone instance you would
need to somehow associate specific instance number with specific SCSI
target; at which point you lose the exact advantage clone gives you
(anonymous instances not requiring any specific configuration). In this
case it is indeed easier to use separate primitives.

> Or is the best route creating
> two separate primitives for 'ocf:esos:scst' and then adding more
> constraints to prevent these from running on the same node and forcing
> their node "ownership"?
> 
> Any help / guidance / advice would be greatly appreciated.
> 
> 
> Thanks,
> 
> Marc
> 
> 
> 
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> https://lists.clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
> 




More information about the Users mailing list