Revision 99721eb4 doc/design-virtual-clusters.rst

b/doc/design-virtual-clusters.rst
106 106
|networking     |                       |with an existing bridge at system   |
107 107
|               |                       |level or use NIC-less instances     |
108 108
+---------------+-----------------------+------------------------------------+
109
|instance OS    |OS add, OS rename,     |Only used with non diskless         |
109
|instance OS    |OS add, OS rename,     |Only used with non-diskless         |
110 110
|operations     |export and import      |instances; could work with custom OS|
111
|               |                       |scripts (that just ``dd`` without   |
111
|               |                       |scripts that just ``dd`` without    |
112 112
|               |                       |mounting filesystems                |
113 113
+---------------+-----------------------+------------------------------------+
114 114
|node networking|IP address management  |Not supported; Ganeti will need to  |
115
|               |(master ip), IP query, |work without a master IP. For the IP|
116
|               |etc.                   |query operations, the test machine  |
115
|               |(master ip), IP query, |work without a master IP; for the IP|
116
|               |etc.                   |query operations the test machine   |
117 117
|               |                       |would need externally-configured IPs|
118 118
+---------------+-----------------------+------------------------------------+
119
|node add       |-                      |SSH command must be adjusted        |
120
+---------------+-----------------------+------------------------------------+
119 121
|node setup     |ssh, /etc/hosts, so on |Can already be disabled from the    |
120 122
|               |                       |cluster config                      |
121 123
+---------------+-----------------------+------------------------------------+
......
171 173

  
172 174
An alternative option is to implement per-node IP/port support in Ganeti
173 175
(especially in the RPC layer), which would eliminate the root rights. We
174
expect that this will get implemented as a second step of this design.
176
expect that this will get implemented as a second step of this design,
177
but as the port is currently static will require changes in many places.
175 178

  
176 179
The only remaining problem is with sharing the ``localstatedir``
177 180
structure (lib, run, log) amongst the daemons, for which we propose to
178
add a command line parameter which can override this path (via injection
179
into ``_autoconf.py``). The rationale for this is two-fold:
181
introduce an environment variable (``GANETI_ROOTDIR``) acting as a
182
prefix for essentially all paths. An environment variable is easier to
183
transport through several levels of programs (shell scripts, Python,
184
etc.) than a command line parameter. In Python code this prefix will be
185
applied to all paths in ``constants.py``. Every virtual node will get
186
its own root directory. The rationale for this is two-fold:
180 187

  
181 188
- having two or more node daemons writing to the same directory might
182 189
  introduce artificial scenarios not existent in real life; currently
......
187 194
  daemon wrote a file successfully, the results from all others are
188 195
  “lost”
189 196

  
197
In case the use of an environment variable turns out to be too difficult
198
a compile-time prefix path could be used. This would then require one
199
Ganeti installation per virtual node, but it might be good enough.
190 200

  
191 201
``rapi``
192 202
--------
......
219 229
----------------------
220 230

  
221 231
It could be possible that the cluster initialisation procedure is a bit
222
more involved (this was not tried yet). In any case, we can build a
223
``config.data`` file manually, without having to actually run
224
``gnt-cluster init``.
232
more involved (this was not tried yet). A script will be used to set up
233
all necessary IP addresses and hostnames, as well as creating the
234
initial directory structure. Building ``config.data`` manually should
235
not be necessary.
225 236

  
226 237
Needed tools
227 238
============
......
230 241
are:
231 242

  
232 243
- a tool to setup per-virtual node tree structure of ``localstatedir``
233
  and setup correctly the extra IP/hostnames
244
  (with the help of ``ensure-dirs``) and setup correctly the extra
245
  IP/hostnames
234 246
- changes to the startup daemon tools to launch correctly the daemons
235 247
  per virtual node
236
- changes to ``noded`` to override the ``localstatedir`` path
248
- changes to ``constants.py`` to override the ``localstatedir`` path
237 249
- documentation for running such a virtual cluster
238 250
- and eventual small fixes to the node daemon backend functionality, to
239 251
  better separate privileged and non-privileged code

Also available in: Unified diff