[ClusterLabs] Colocation by Node

Marc Smith marc.smith at parodyne.com
Mon Oct 1 11:09:51 EDT 2018


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? 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20181001/f52ddd3b/attachment.html>


More information about the Users mailing list