Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #267 from davidvossel/require-all-docs

Low: doc: Documention of 'require-all' option for "OR" logic in ordered sets
  • Loading branch information...
commit cb7b3f48dea9eb1b6825242da2ef507887b409cc 2 parents 406e1b6 + d65dde0
Andrew Beekhof authored March 20, 2013
43  doc/Pacemaker_Explained/en-US/Ch-Constraints.txt
@@ -484,6 +484,49 @@ limit to the number of sets that can be specified.
484 484
 .Visual representation of the start order for the three sets defined above
485 485
 image::images/three-sets.png["Three ordered sets",width="16cm",height="7.5cm",align="center"]
486 486
 
  487
+
  488
+== Resource Set OR Logic ==
  489
+
  490
+The unordered set logic discussed so far has all been "AND" logic.
  491
+To illustrate this take the 3 resource set figure in the previous section.
  492
+Those sets can be expressed, +(A and B) then (C) then (D) then (E and F)+
  493
+
  494
+Say for example we want change the first set, (A and B), to use "OR" logic
  495
+so the sets look like this, +(A or B) then (C) then (D) then (E and F)+.
  496
+This functionality can be achieved through the use of the +require-all+
  497
+option.  By default this option is 'require-all=true' which is why the
  498
+"AND" logic is used by default.  Changing +require-all=false+ means only one
  499
+resource in the set needs to be started before continuing on to the next set.
  500
+
  501
+Note that the 'require-all=false' option only makes sense to use in conjunction
  502
+with unordered sets, 'sequential=false'.  Think of it like this, 'sequential=false'
  503
+modifies the set to be an unordered set that uses "AND" logic by default, by adding
  504
+'require-all=false' the unordered set's "AND" logic is flipped to "OR" logic.
  505
+
  506
+.Resource Set "OR" logic. Three ordered sets, where the first set is internally unordered with "OR" logic.
  507
+======
  508
+[source,XML]
  509
+-------
  510
+<constraints>
  511
+    <rsc_order id="order-1">
  512
+      <resource_set id="ordered-set-1" sequential="false" require-all="false">
  513
+        <resource_ref id="A"/>
  514
+        <resource_ref id="B"/>
  515
+      </resource_set>
  516
+      <resource_set id="ordered-set-2" sequential="true">
  517
+        <resource_ref id="C"/>
  518
+        <resource_ref id="D"/>
  519
+      </resource_set>
  520
+      <resource_set id="ordered-set-3" sequential="false">
  521
+        <resource_ref id="E"/>
  522
+        <resource_ref id="F"/>
  523
+      </resource_set>
  524
+    </rsc_order>
  525
+</constraints>
  526
+-------
  527
+======
  528
+
  529
+
487 530
 [[s-resource-sets-collocation]]
488 531
 == Collocating Sets of Resources ==
489 532
 

0 notes on commit cb7b3f4

Please sign in to comment.
Something went wrong with that request. Please try again.