[pve-devel] [PATCH] HA: add the managers' FSM diagram

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Sep 15 14:20:37 CEST 2016


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---

for now as SVG as the graphviz filter from asciidoc isn't that
obedient when asked to render the FSM as vector graphic.. :(

 ha-manager.adoc           |   6 ++
 images/ha-manager-fsm.svg | 166 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 172 insertions(+)
 create mode 100644 images/ha-manager-fsm.svg

diff --git a/ha-manager.adoc b/ha-manager.adoc
index 5db5b05..9e8dc06 100644
--- a/ha-manager.adoc
+++ b/ha-manager.adoc
@@ -161,6 +161,12 @@ The cluster resource manager (CRM), it controls the cluster wide
 actions of the services, processes the LRM results and includes the state
 machine which controls the state of each service.
 
+ifndef::manvolnum[]
+
+image::images/ha-manager-fsm.svg[title="Managers' Finite State Machine: blue are manual and black are automatic triggered transitions",align="center"]
+
+endif::manvolnum[]
+
 .Locks in the LRM & CRM
 [NOTE]
 Locks are provided by our distributed configuration file system (pmxcfs).
diff --git a/images/ha-manager-fsm.svg b/images/ha-manager-fsm.svg
new file mode 100644
index 0000000..bc39c14
--- /dev/null
+++ b/images/ha-manager-fsm.svg
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Generated by graphviz version 2.38.0 (20140413.2041)
+ -->
+<!-- Title: ha_manager_fsm Pages: 1 -->
+<svg width="917pt" height="404pt"
+ viewBox="0.00 0.00 916.68 404.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 400)">
+<title>ha_manager_fsm</title>
+<polygon fill="white" stroke="none" points="-4,4 -4,-400 912.682,-400 912.682,4 -4,4"/>
+<!-- error -->
+<g id="node1" class="node"><title>error</title>
+<ellipse fill="none" stroke="black" cx="31.9475" cy="-172" rx="27.9017" ry="27.9017"/>
+<ellipse fill="none" stroke="black" cx="31.9475" cy="-172" rx="31.8951" ry="31.8951"/>
+<text text-anchor="middle" x="31.9475" y="-168.3" font-family="Times,serif" font-size="14.00">error</text>
+</g>
+<!-- stopped -->
+<g id="node2" class="node"><title>stopped</title>
+<ellipse fill="none" stroke="black" cx="244.395" cy="-172" rx="38.2082" ry="38.2082"/>
+<ellipse fill="none" stroke="black" cx="244.395" cy="-172" rx="42.1937" ry="42.1937"/>
+<text text-anchor="middle" x="244.395" y="-168.3" font-family="Times,serif" font-size="14.00">stopped</text>
+</g>
+<!-- error->stopped -->
+<g id="edge18" class="edge"><title>error->stopped</title>
+<path fill="none" stroke="black" d="M61.1552,-159.018C67.8189,-156.526 74.996,-154.292 81.895,-153 118.953,-146.06 161.297,-151.531 193.328,-158.353"/>
+<polygon fill="black" stroke="black" points="192.821,-161.827 203.345,-160.602 194.354,-154.997 192.821,-161.827"/>
+<text text-anchor="middle" x="122.395" y="-156.8" font-family="Times,serif" font-size="14.00" fill="blue">disable service</text>
+</g>
+<!-- stopped->error -->
+<g id="edge2" class="edge"><title>stopped->error</title>
+<path fill="none" stroke="black" d="M201.688,-172C164.779,-172 111.211,-172 74.384,-172"/>
+<polygon fill="black" stroke="black" points="73.9998,-168.5 63.9998,-172 73.9997,-175.5 73.9998,-168.5"/>
+<text text-anchor="middle" x="122.395" y="-175.8" font-family="Times,serif" font-size="14.00">service error</text>
+</g>
+<!-- stopped->stopped -->
+<g id="edge1" class="edge"><title>stopped->stopped</title>
+<path fill="none" stroke="black" d="M222.666,-208.531C222.199,-221.65 229.442,-232.347 244.395,-232.347 255.259,-232.347 262.054,-226.7 264.778,-218.58"/>
+<polygon fill="black" stroke="black" points="268.265,-218.907 266.124,-208.531 261.327,-217.978 268.265,-218.907"/>
+<text text-anchor="middle" x="244.395" y="-236.147" font-family="Times,serif" font-size="14.00">service runs</text>
+</g>
+<!-- started -->
+<g id="node3" class="node"><title>started</title>
+<ellipse fill="none" stroke="black" cx="661.342" cy="-193" rx="34.3995" ry="34.3995"/>
+<ellipse fill="none" stroke="black" cx="661.342" cy="-193" rx="38.394" ry="38.394"/>
+<text text-anchor="middle" x="661.342" y="-189.3" font-family="Times,serif" font-size="14.00">started</text>
+</g>
+<!-- stopped->started -->
+<g id="edge3" class="edge"><title>stopped->started</title>
+<path fill="none" stroke="black" d="M286.983,-172.451C354.012,-173.439 490.045,-176.532 604.895,-186 607.568,-186.22 610.31,-186.475 613.075,-186.753"/>
+<polygon fill="black" stroke="black" points="612.786,-190.242 623.107,-187.849 613.546,-183.284 612.786,-190.242"/>
+<text text-anchor="middle" x="451.895" y="-182.8" font-family="Times,serif" font-size="14.00" fill="blue">enable service</text>
+</g>
+<!-- migrate -->
+<g id="node4" class="node"><title>migrate</title>
+<ellipse fill="none" stroke="black" cx="867.735" cy="-99" rx="38.1938" ry="38.1938"/>
+<text text-anchor="middle" x="867.735" y="-95.3" font-family="Times,serif" font-size="14.00">migrate</text>
+</g>
+<!-- stopped->migrate -->
+<g id="edge4" class="edge"><title>stopped->migrate</title>
+<path fill="none" stroke="black" d="M285.782,-162.324C337.287,-150.308 429.232,-129.942 508.895,-118 601.131,-104.174 624.629,-102.45 717.789,-98 751.606,-96.3848 789.79,-96.6832 819.03,-97.3604"/>
+<polygon fill="black" stroke="black" points="819.287,-100.868 829.373,-97.6242 819.465,-93.8703 819.287,-100.868"/>
+<text text-anchor="middle" x="556.895" y="-121.8" font-family="Times,serif" font-size="14.00" fill="blue">migrate service</text>
+</g>
+<!-- fence -->
+<g id="node5" class="node"><title>fence</title>
+<ellipse fill="none" stroke="black" cx="451.895" cy="-239" rx="29.795" ry="29.795"/>
+<text text-anchor="middle" x="451.895" y="-235.3" font-family="Times,serif" font-size="14.00">fence</text>
+</g>
+<!-- stopped->fence -->
+<g id="edge5" class="edge"><title>stopped->fence</title>
+<path fill="none" stroke="black" d="M285.018,-184.918C322.118,-197.014 377.145,-214.955 413.504,-226.809"/>
+<polygon fill="black" stroke="black" points="412.641,-230.209 423.234,-229.981 414.811,-223.554 412.641,-230.209"/>
+<text text-anchor="middle" x="360.395" y="-223.8" font-family="Times,serif" font-size="14.00">node failed</text>
+</g>
+<!-- started->error -->
+<g id="edge7" class="edge"><title>started->error</title>
+<path fill="none" stroke="black" d="M624.641,-180.904C545.123,-155.444 347.324,-100.311 180.895,-121 135.86,-126.598 124.241,-129.682 81.895,-146 77.6386,-147.64 73.28,-149.565 69.0032,-151.612"/>
+<polygon fill="black" stroke="black" points="67.1988,-148.601 59.8423,-156.226 70.3478,-154.853 67.1988,-148.601"/>
+<text text-anchor="middle" x="360.395" y="-130.8" font-family="Times,serif" font-size="14.00">service error</text>
+</g>
+<!-- started->started -->
+<g id="edge8" class="edge"><title>started->started</title>
+<path fill="none" stroke="black" d="M642.633,-226.611C642.02,-239.136 648.256,-249.447 661.342,-249.447 670.543,-249.447 676.358,-244.35 678.786,-236.969"/>
+<polygon fill="black" stroke="black" points="682.313,-236.961 680.051,-226.611 675.364,-236.113 682.313,-236.961"/>
+<text text-anchor="middle" x="661.342" y="-253.247" font-family="Times,serif" font-size="14.00">service stopped</text>
+</g>
+<!-- started->migrate -->
+<g id="edge9" class="edge"><title>started->migrate</title>
+<path fill="none" stroke="black" d="M699.983,-194.681C731.11,-194.424 775.454,-190.136 808.789,-171 821.791,-163.536 833.022,-151.929 842.041,-140.197"/>
+<polygon fill="black" stroke="black" points="844.876,-142.251 847.927,-132.105 839.215,-138.133 844.876,-142.251"/>
+<text text-anchor="middle" x="763.289" y="-197.8" font-family="Times,serif" font-size="14.00" fill="blue">migrate service</text>
+</g>
+<!-- started->fence -->
+<g id="edge10" class="edge"><title>started->fence</title>
+<path fill="none" stroke="black" d="M627.701,-211.842C620.392,-215.386 612.536,-218.697 604.895,-221 567.521,-232.265 522.991,-236.529 491.823,-238.117"/>
+<polygon fill="black" stroke="black" points="491.631,-234.622 481.795,-238.559 491.94,-241.615 491.631,-234.622"/>
+<text text-anchor="middle" x="556.895" y="-240.8" font-family="Times,serif" font-size="14.00">node failed</text>
+</g>
+<!-- req_stop -->
+<g id="node6" class="node"><title>req_stop</title>
+<ellipse fill="none" stroke="black" cx="867.735" cy="-321" rx="40.8928" ry="40.8928"/>
+<text text-anchor="middle" x="867.735" y="-317.3" font-family="Times,serif" font-size="14.00">req_stop</text>
+</g>
+<!-- started->req_stop -->
+<g id="edge6" class="edge"><title>started->req_stop</title>
+<path fill="none" stroke="black" d="M696.729,-208.622C727.221,-223.094 772.43,-246.09 808.789,-271 815.801,-275.804 822.927,-281.329 829.672,-286.915"/>
+<polygon fill="black" stroke="black" points="827.496,-289.659 837.385,-293.461 832.025,-284.322 827.496,-289.659"/>
+<text text-anchor="middle" x="763.289" y="-274.8" font-family="Times,serif" font-size="14.00" fill="blue">disable service</text>
+</g>
+<!-- migrate->error -->
+<g id="edge16" class="edge"><title>migrate->error</title>
+<path fill="none" stroke="black" d="M837.722,-74.5281C799.915,-45.2113 730.553,-0 662.342,-0 243.395,-0 243.395,-0 243.395,-0 158.151,-0 88.4178,-85.6526 54.754,-136.072"/>
+<polygon fill="black" stroke="black" points="51.6258,-134.46 49.0849,-144.746 57.4854,-138.29 51.6258,-134.46"/>
+<text text-anchor="middle" x="451.895" y="-3.8" font-family="Times,serif" font-size="14.00">service error</text>
+</g>
+<!-- migrate->stopped -->
+<g id="edge15" class="edge"><title>migrate->stopped</title>
+<path fill="none" stroke="black" d="M829.364,-94.7216C822.527,-94.0552 815.449,-93.4422 808.789,-93 593.832,-78.728 528.727,-62.4113 325.895,-135 314.581,-139.049 302.676,-144.073 291.593,-149.099"/>
+<polygon fill="black" stroke="black" points="290.116,-145.926 282.508,-153.3 293.054,-152.279 290.116,-145.926"/>
+<text text-anchor="middle" x="556.895" y="-89.8" font-family="Times,serif" font-size="14.00">service migrated</text>
+</g>
+<!-- migrate->started -->
+<g id="edge14" class="edge"><title>migrate->started</title>
+<path fill="none" stroke="black" d="M835.487,-119.821C827.088,-124.716 817.821,-129.515 808.789,-133 770.242,-147.872 755.493,-135.105 717.789,-152 711.55,-154.796 705.335,-158.385 699.444,-162.274"/>
+<polygon fill="black" stroke="black" points="697.265,-159.527 691.079,-168.129 701.279,-165.261 697.265,-159.527"/>
+<text text-anchor="middle" x="763.289" y="-155.8" font-family="Times,serif" font-size="14.00">service migrated</text>
+</g>
+<!-- migrate->fence -->
+<g id="edge17" class="edge"><title>migrate->fence</title>
+<path fill="none" stroke="black" d="M829.202,-100.228C780.649,-102.649 693.88,-109.817 622.895,-131 568.989,-147.086 555.207,-154.064 508.895,-186 498.838,-192.935 488.834,-201.662 480.124,-210.021"/>
+<polygon fill="black" stroke="black" points="477.491,-207.702 472.834,-217.218 482.409,-212.683 477.491,-207.702"/>
+<text text-anchor="middle" x="661.342" y="-134.8" font-family="Times,serif" font-size="14.00">node failed</text>
+</g>
+<!-- fence->error -->
+<g id="edge19" class="edge"><title>fence->error</title>
+<path fill="none" stroke="black" d="M422.73,-246.541C372.986,-258.598 266.722,-278.666 180.895,-256 138.063,-244.689 94.6365,-217.798 66.0141,-197.466"/>
+<polygon fill="black" stroke="black" points="67.7761,-194.421 57.6236,-191.391 63.6709,-200.091 67.7761,-194.421"/>
+<text text-anchor="middle" x="244.395" y="-270.8" font-family="Times,serif" font-size="14.00">service not recoverable</text>
+</g>
+<!-- fence->started -->
+<g id="edge20" class="edge"><title>fence->started</title>
+<path fill="none" stroke="black" d="M475.432,-220.188C485.123,-213.185 496.955,-205.978 508.895,-202 542.313,-190.866 582.145,-188.908 612.571,-189.578"/>
+<polygon fill="black" stroke="black" points="612.806,-193.088 622.914,-189.914 613.033,-186.091 612.806,-193.088"/>
+<text text-anchor="middle" x="556.895" y="-205.8" font-family="Times,serif" font-size="14.00">service recovered</text>
+</g>
+<!-- req_stop->error -->
+<g id="edge12" class="edge"><title>req_stop->error</title>
+<path fill="none" stroke="black" d="M830.382,-338.516C790.225,-356.226 723.178,-381 662.342,-381 243.395,-381 243.395,-381 243.395,-381 147.595,-381 79.8898,-270.615 50.0414,-210.288"/>
+<polygon fill="black" stroke="black" points="53.083,-208.538 45.5774,-201.061 46.7815,-211.587 53.083,-208.538"/>
+<text text-anchor="middle" x="451.895" y="-384.8" font-family="Times,serif" font-size="14.00">service error</text>
+</g>
+<!-- req_stop->stopped -->
+<g id="edge11" class="edge"><title>req_stop->stopped</title>
+<path fill="none" stroke="black" d="M826.55,-322.504C746.102,-324.371 560.344,-322.901 412.895,-278 372.359,-265.656 361.847,-261.428 325.895,-239 311.331,-229.914 296.561,-218.418 283.718,-207.525"/>
+<polygon fill="black" stroke="black" points="285.844,-204.736 275.989,-200.847 281.267,-210.033 285.844,-204.736"/>
+<text text-anchor="middle" x="556.895" y="-317.8" font-family="Times,serif" font-size="14.00">service stopped</text>
+</g>
+<!-- req_stop->fence -->
+<g id="edge13" class="edge"><title>req_stop->fence</title>
+<path fill="none" stroke="black" d="M826.975,-315.308C760.594,-305.464 623.203,-283.635 508.895,-256 502.948,-254.562 496.7,-252.86 490.622,-251.098"/>
+<polygon fill="black" stroke="black" points="491.22,-247.624 480.636,-248.111 489.214,-254.33 491.22,-247.624"/>
+<text text-anchor="middle" x="661.342" y="-298.8" font-family="Times,serif" font-size="14.00">node failed</text>
+</g>
+</g>
+</svg>
-- 
2.1.4





More information about the pve-devel mailing list