01.10.2018 18:23, Ken Gaillot пишет: > On Mon, 2018-10-01 at 11:09 -0400, Marc Smith wrote: >> 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 > > No, there's no way to constrain against a particular clone instance.
Hmm ... commit 6ebb25aaa749903b77ad810c8b100745bb3f2a5f Author: Andrew Beekhof <and...@beekhof.net> Date: Fri Apr 30 15:01:25 2010 +0200 Medium: PE: Bug lf#2169 - Allow constraints to apply to specific instances of clones (regression tests) It does not appear to be documented anywhere and I am not even sure whether it is enabled by default, but code appears to be there. > Using separate primitives would be your best bet. > >> 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@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 _______________________________________________ Users mailing list: Users@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