Debian Codegraph @

doc/Design

raw
1 I'm in the process of putting together a Phase I architecture as I
2 mentioned in an earlier posting, and is mentioned on the web site.
3
4 The first question that comes to mind are Phase I goals:
5 Service/Resource failover
6 Service Groups or dependencies
7 Resource Diagnostics
8 /proc (or /ha) interface for status and control
9 2-n node cluster size
10 redundant NIC failover
11 shared/mirrored filesystem takeovers
12 {ala Poor Man's data replication}
13
14
15
16 Towards this end I've drawn a few pictures, and written a few words
17 of text. The picture is related to Tom Vogt's picture, but has several
18 differences. It is very similar to the proposed project framework on the
19 HA web site. Each component in this picture is replicated on each
20 node in the cluster.
21
22 manual requests
23 |
24 v
25 +---------+----------------+
26 | |
27 | |
28 v v
29 diagnostics +----------------+
30 (scheduled | |
31 and manual) ------------->| Configuration +------> Application
32 | Management | Notification
33 monitoring/heartbeat-------->| | API
34 +--------+-------+
35 | ((Re)configuration
36 | Modules)
37 +-------------+---------------+----------+
38 | | | |
39 v v v v
40 IP Takeover Filesystem Application etc.
41 Takeover Start/Restart
42
43 The discussion below talks about the system in terms of objects,
44 although the current code is written in C (not C++), and I expect
45 the new framework to be implemented in the same way.
46
47 There is a presumption in this design that each node has a copy
48 of the whole cluster configuration. Otherwise, when the
49 cluster is reforming itself, it doesn't know what resources
50 provided by missing nodes should be instantiated in a failover
51 mode on a "replacement" node.
52
53 The most common/important kind of object in this model is the resource
54 - Resources are things like IP addresses, NICs, filesystems,
55 disks, applications, etc.
56
57 The following methods exist for every resource:
58 name() The name of this resource (ASCII string)
59 provided_by() Returns the node providing this resource
60 type() Returns the "type" of a given resource
61 See "resource_type" object below.
62 service_state() returns IN_SERVICE, OOS or PENDING_OOS
63 (REMOVED or PENDING_REMOVE?)
64 in_service() Brings the resource into service
65 oo_service() Takes the resource out of service, gracefully
66 force_oos() Takes the resource out of service, immediately.
67 mark_oos() Mark a failed resource as out of service
68 takes no action to take the resource out
69 of service
70
71 There is a (static member) function which locates a resource:
72 find_resource() Returns the resource that corresponds to the given
73 name
74 There is also an object called resource-list-item
75 It has the following methods:
76 next() The next resource-list-item in the list
77 resource() The resource associated with this list item
78
79 Resources also have the following member functions (which returns
80 a resource-list)
81 dependson_list() Returns the list of resources which this
82 resource depends directly on
83
84 dependents_list() Returns the list of resources which depend
85 directly on this resource
86
87 These dependency lists can be manipulated by these two functions:
88 dependson(r1, r2) Mark resource r1 as dependent on resource r2
89
90 There is also a fundamental object called a resource_type
91 It has member functions like these:
92 instantiate() Creates a resource of the given type
93 typename() returns an ASCII string naming the type
94
95 ................................. .................................
96 Things which are not yet defined but I know I need.
97
98 Diagnostics objects
99
100 Application notification objects
101 (so an application can register that it wants to
102 be notified about cluster transitions, etc.)
103
104 Message:
105 A set of {name,value} pairs sent from a node to all nodes, or
106 to a single node. This is what I now implement in "heartbeat" (this
107 version is awaiting testing by SuSE users before release)
108
109 Some of the things I haven't defined, I don't know I need, and some
110 of them are just lower-level details that I haven't gotten to.
111 -----------------------------------------------------------------------
112 Continuing on...
113 -----------------------------------------------------------------------
114 Inside the Configuration Management Subsystem, there exists what I call
115 a configuration strategy module. At this point I assume that this
116 is a plug-in module, which can be replaced with any one of a number
117 of strategy modules, according to the needs of the system or whims
118 of the administrator.
119
120 My initial thoughts on a first-cut node transition strategy module
121 go like this:
122
123 Timeouts and new transitions cause restart from step 1
124
125 Step 1:
126 Declare a cluster transition
127
128 Step 2: (one everyone has ACKed the cluster transition)
129 Declare a "transition master" node (somehow -lowest node name?)
130
131 Step 2: (once everyone has ACKed the transition master)
132 Master Requests a config report (what resources each node has)
133
134 Step 3: (once every node has reported)
135 For each resource group, the transition master requests
136 a cost of providing it from each node
137 (infinite if it cannot be provided)
138 Step 4:
139 Transition Manager requests
140
141 And then I finish this document later...