root / doc / design-2.0-cluster-parameters.rst @ c2b05d85
History | View | Annotate | Download (3.9 kB)
1 | 132b4ba2 | Alexander Schreiber | Ganeti 2.0 cluster parameters |
---|---|---|---|
2 | 132b4ba2 | Alexander Schreiber | ============================= |
3 | 132b4ba2 | Alexander Schreiber | |
4 | 132b4ba2 | Alexander Schreiber | .. contents:: |
5 | 132b4ba2 | Alexander Schreiber | |
6 | 132b4ba2 | Alexander Schreiber | Objective |
7 | 132b4ba2 | Alexander Schreiber | --------- |
8 | 132b4ba2 | Alexander Schreiber | |
9 | 132b4ba2 | Alexander Schreiber | With the introduction of the HVM hypervisor in Ganeti 1.2 and the |
10 | 132b4ba2 | Alexander Schreiber | implementation of multiple hypervisor support in Ganeti 2.0, the way |
11 | 132b4ba2 | Alexander Schreiber | the cluster parameters are handled needs to be reorganized accordingly. |
12 | 132b4ba2 | Alexander Schreiber | |
13 | 132b4ba2 | Alexander Schreiber | Background |
14 | 132b4ba2 | Alexander Schreiber | ---------- |
15 | 132b4ba2 | Alexander Schreiber | |
16 | 132b4ba2 | Alexander Schreiber | When the HVM hypervisor was introduced in Ganeti 1.2, the additional |
17 | 132b4ba2 | Alexander Schreiber | instance parameters needed for it were simply added to the instance |
18 | 132b4ba2 | Alexander Schreiber | namespace, as were additional parameters for the PVM hypervisor. |
19 | 132b4ba2 | Alexander Schreiber | |
20 | 132b4ba2 | Alexander Schreiber | As a result of this, wether a particular parameter is valid for the |
21 | 132b4ba2 | Alexander Schreiber | actual hypervisor could either be guessed from the name but only |
22 | 132b4ba2 | Alexander Schreiber | really checked by following the code using it. |
23 | 132b4ba2 | Alexander Schreiber | |
24 | 132b4ba2 | Alexander Schreiber | This design doc aims to provide an approach to solve this. |
25 | 132b4ba2 | Alexander Schreiber | |
26 | 132b4ba2 | Alexander Schreiber | Overview |
27 | 132b4ba2 | Alexander Schreiber | -------- |
28 | 132b4ba2 | Alexander Schreiber | |
29 | 132b4ba2 | Alexander Schreiber | The instance level hypervisor parameters will be moved into a separate |
30 | 132b4ba2 | Alexander Schreiber | sub-tree of the instance name space. Also, a mechanismum to allow for |
31 | 132b4ba2 | Alexander Schreiber | automatic checking and possibly validation of hypervisor parameters |
32 | 132b4ba2 | Alexander Schreiber | will be outlined. |
33 | 132b4ba2 | Alexander Schreiber | |
34 | 132b4ba2 | Alexander Schreiber | |
35 | 132b4ba2 | Alexander Schreiber | Detailed Design |
36 | 132b4ba2 | Alexander Schreiber | --------------- |
37 | 132b4ba2 | Alexander Schreiber | |
38 | 132b4ba2 | Alexander Schreiber | Hypervisor Parameter |
39 | 132b4ba2 | Alexander Schreiber | ~~~~~~~~~~~~~~~~~~~~ |
40 | 132b4ba2 | Alexander Schreiber | |
41 | 132b4ba2 | Alexander Schreiber | A hypervisor parameter (or hypervisor specific parameter) is defined |
42 | 132b4ba2 | Alexander Schreiber | as a parameter that is interpreted by the hypervisor support code in |
43 | 132b4ba2 | Alexander Schreiber | Ganeti and usually is specific to a particular hypervisor (like the |
44 | cd55576a | Alexander Schreiber | kernel path for PVM which makes no sense for HVM). |
45 | 132b4ba2 | Alexander Schreiber | |
46 | 132b4ba2 | Alexander Schreiber | Cluster parameters |
47 | 132b4ba2 | Alexander Schreiber | ~~~~~~~~~~~~~~~~~~ |
48 | 132b4ba2 | Alexander Schreiber | |
49 | 132b4ba2 | Alexander Schreiber | The cluster parameter namespace will be extended with cluster level |
50 | 132b4ba2 | Alexander Schreiber | hypervisor specific parameters. The typical expected use case for this |
51 | 132b4ba2 | Alexander Schreiber | is to store default values for instance level hypervisor parameters. |
52 | 132b4ba2 | Alexander Schreiber | |
53 | 132b4ba2 | Alexander Schreiber | |
54 | 132b4ba2 | Alexander Schreiber | Instance parameters |
55 | 132b4ba2 | Alexander Schreiber | ~~~~~~~~~~~~~~~~~~~ |
56 | 132b4ba2 | Alexander Schreiber | |
57 | 132b4ba2 | Alexander Schreiber | The only hypervisor parameter to remain at the top level of the |
58 | c63b161a | Alexander Schreiber | instance namespace will be instance.hypervisor, specifying not |
59 | 132b4ba2 | Alexander Schreiber | only the hypervisor type to be used for that instance, but also |
60 | 132b4ba2 | Alexander Schreiber | implicitly the hypervisor type to use for parameter checks. |
61 | 132b4ba2 | Alexander Schreiber | |
62 | 132b4ba2 | Alexander Schreiber | All other instance level hypervisor parameters will be moved into the |
63 | c63b161a | Alexander Schreiber | instance.hvparams namespace subtree. |
64 | 132b4ba2 | Alexander Schreiber | |
65 | c63b161a | Alexander Schreiber | The names for hypervisor parameters in the instance.hvparams |
66 | 132b4ba2 | Alexander Schreiber | subtree should be choosen as generic as possible, especially if |
67 | 132b4ba2 | Alexander Schreiber | specific parameters could conceivably be useful for more than one |
68 | 132b4ba2 | Alexander Schreiber | hypervisor, e.g. |
69 | c63b161a | Alexander Schreiber | instance.hvparams.vnc_console_port instead of using both |
70 | c63b161a | Alexander Schreiber | instance.hvparams.hvm_vnc_console_port and |
71 | c63b161a | Alexander Schreiber | instance.hvparams.kvm_vnc_console_port. |
72 | 132b4ba2 | Alexander Schreiber | |
73 | c63b161a | Alexander Schreiber | The instance.hvparams subtree will be implemented as a dict. |
74 | 132b4ba2 | Alexander Schreiber | |
75 | 132b4ba2 | Alexander Schreiber | Examples for instance level hypervisor parameters: |
76 | 132b4ba2 | Alexander Schreiber | |
77 | 132b4ba2 | Alexander Schreiber | :boot_order: boot device order |
78 | 132b4ba2 | Alexander Schreiber | :vnc_bind_address: bind address for VNC console |
79 | 132b4ba2 | Alexander Schreiber | :vnc_bind_port: bind port for VNC console |
80 | 132b4ba2 | Alexander Schreiber | :kernel_path: path to the kernel binary |
81 | 132b4ba2 | Alexander Schreiber | :disk_type: type of the virtual disk interface |
82 | 132b4ba2 | Alexander Schreiber | |
83 | 132b4ba2 | Alexander Schreiber | With this design, hypervisor specific parameters for disk and NIC |
84 | 132b4ba2 | Alexander Schreiber | devices are defined globally for all devices of that type in the instance. |
85 | 132b4ba2 | Alexander Schreiber | It may become necessary later to allow setting these parameters on a |
86 | 132b4ba2 | Alexander Schreiber | per device basis, which will require design changes to the cluster |
87 | 132b4ba2 | Alexander Schreiber | parameters. |
88 | 132b4ba2 | Alexander Schreiber | |
89 | 132b4ba2 | Alexander Schreiber | All other, non hypervisor related parameters of the instance remain at |
90 | 132b4ba2 | Alexander Schreiber | the top level of the instance namespace. This includes: |
91 | 132b4ba2 | Alexander Schreiber | |
92 | 132b4ba2 | Alexander Schreiber | - disks |
93 | 132b4ba2 | Alexander Schreiber | - nics |
94 | 132b4ba2 | Alexander Schreiber | - mem |
95 | 132b4ba2 | Alexander Schreiber | - vcpu |
96 | 132b4ba2 | Alexander Schreiber | - status |
97 | 132b4ba2 | Alexander Schreiber | - OS |
98 | 132b4ba2 | Alexander Schreiber | |
99 | 132b4ba2 | Alexander Schreiber | |
100 | 132b4ba2 | Alexander Schreiber | |
101 | 132b4ba2 | Alexander Schreiber | Hypervisor support requirements |
102 | 132b4ba2 | Alexander Schreiber | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
103 | 132b4ba2 | Alexander Schreiber | |
104 | 132b4ba2 | Alexander Schreiber | To support the new cluster parameter design, additional features will |
105 | 132b4ba2 | Alexander Schreiber | be required from the hypervisor support implementations in Ganeti. |
106 | 132b4ba2 | Alexander Schreiber | |
107 | 132b4ba2 | Alexander Schreiber | The hypervisor support implementation API will be extended with the |
108 | 132b4ba2 | Alexander Schreiber | following features: |
109 | 132b4ba2 | Alexander Schreiber | |
110 | 132b4ba2 | Alexander Schreiber | :GetValidClusterParameters(): returns a list of valid cluster level |
111 | 132b4ba2 | Alexander Schreiber | parameters for this hypervisor, |
112 | 132b4ba2 | Alexander Schreiber | :GetValidInstanceParameters(): provide a list of valid instance level |
113 | 132b4ba2 | Alexander Schreiber | parameters for this hypervisor, |
114 | 132b4ba2 | Alexander Schreiber | :VerifyParameter(parameter_name, parameter_value): verifies the |
115 | 132b4ba2 | Alexander Schreiber | provided parameter against this hypervisor: |
116 | 132b4ba2 | Alexander Schreiber | |
117 | 132b4ba2 | Alexander Schreiber | - if the provided parameter name is valid for this hypervisor |
118 | 132b4ba2 | Alexander Schreiber | - if applicable, if the provided value is valid for this hypervisor |
119 | 132b4ba2 | Alexander Schreiber | |
120 | 132b4ba2 | Alexander Schreiber | The VerifyParameter(..) function will return True or False. |
121 | 132b4ba2 | Alexander Schreiber | |
122 | 132b4ba2 | Alexander Schreiber | |
123 | 132b4ba2 | Alexander Schreiber | The parameter validation will be used for every addition or change of |
124 | 132b4ba2 | Alexander Schreiber | hypervisor parameters. |