File: ConvergenceAndForcedChanges.html

package info (click to toggle)
cfengine3 3.0.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,452 kB
  • ctags: 6,615
  • sloc: ansic: 62,933; sh: 9,712; yacc: 347; makefile: 287; sql: 23
file content (90 lines) | stat: -rw-r--r-- 1,469 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Convergence and Forced Operations</title>
  </head>

  <body>
    <h1>Convergence and Forced Operations</h1>


Cfengine is about convergence to a stable state. The state of the system should 
normally be at a fixed point, or else it should be returned to a fixed point.

Occasionally changes in dependencies lead us to force changes, e.g. kill and
restart a daemon. 

<pre>
commands:

    "Stop command";
    "Start command";
</pre>
or
<pre>
processes:

    "myprocess" signal => "term";

commands:

    "start command";
</pre>

The problem with these commands is that they are not "guarded" (in the sense of Dijkstra's
guarded commands). Such a command is not a convergent change unless it is qualified by a
guarding class.

e.g.

<pre>
processes:

  change_in_dependency::

    "myprocess" signal => "term";


commands:

  change_in_dependency::

    "start command"
</pre>
or
<pre>
execution:

 change_in_dependency::

    "Stop command";
    "Start command";
</pre>
or even
<pre>
processes:

  change_in_dependency::

    "myprocess" 
        signal => "term"
        # define newclass ;


commands:

  new_class::

    "start command"
</pre>



    <hr>
    <address><a href="mailto:mark@atlas">Mark Burgess</a></address>
<!-- Created: Thu May  1 13:07:13 CEST 2008 -->
<!-- hhmts start -->
Last modified: Sat Aug  2 09:58:12 CEST 2008
<!-- hhmts end -->
  </body>
</html>