Re: [ClusterLabs] Colocation by Node
02.10.2018 23:49, Ken Gaillot пишет: ... 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 >> 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. > > Ah, I remember now running across that when pulling out old code from > 2.0. > > It's in the testing-ground "pacemaker-next" schema, so someone would > have to mess with the validate-with property explicitly to try it. I > doubt it would work reliably with the current clone code. The > originally proposed use case was colocating different IPs with > different clone instances. > I guess it can be used for every resource agent that supports globally-unique option as long as we have some way to associate specific function with specific instance. But unless this can be done in semi-automated way like IPaddr2 it is probably easier to simply create individual primitives instead. ___ 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
Re: [ClusterLabs] Colocation by Node
On Tue, 2018-10-02 at 21:57 +0300, Andrei Borzenkov wrote: > 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 > 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. Ah, I remember now running across that when pulling out old code from 2.0. It's in the testing-ground "pacemaker-next" schema, so someone would have to mess with the validate-with property explicitly to try it. I doubt it would work reliably with the current clone code. The originally proposed use case was colocating different IPs with different clone instances. > > 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 -- Ken Gaillot ___ 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
Re: [ClusterLabs] Colocation by Node
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@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
Re: [ClusterLabs] Colocation by Node
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 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
Re: [ClusterLabs] Colocation by Node
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. 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 -- Ken Gaillot ___ 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
[ClusterLabs] Colocation by Node
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 ___ 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