1 Ganeti 2.0 cluster parameters
2 =============================
9 With the introduction of the HVM hypervisor in Ganeti 1.2 and the
10 implementation of multiple hypervisor support in Ganeti 2.0, the way
11 the cluster parameters are handled needs to be reorganized accordingly.
16 When the HVM hypervisor was introduced in Ganeti 1.2, the additional
17 instance parameters needed for it were simply added to the instance
18 namespace, as were additional parameters for the PVM hypervisor.
20 As a result of this, wether a particular parameter is valid for the
21 actual hypervisor could either be guessed from the name but only
22 really checked by following the code using it.
24 This design doc aims to provide an approach to solve this.
29 The instance level hypervisor parameters will be moved into a separate
30 sub-tree of the instance name space. Also, a mechanismum to allow for
31 automatic checking and possibly validation of hypervisor parameters
41 A hypervisor parameter (or hypervisor specific parameter) is defined
42 as a parameter that is interpreted by the hypervisor support code in
43 Ganeti and usually is specific to a particular hypervisor (like the
44 kernel path for PVM which makes no sense for HVM).
49 The cluster parameter namespace will be extended with cluster level
50 hypervisor specific parameters. The typical expected use case for this
51 is to store default values for instance level hypervisor parameters.
57 The only hypervisor parameter to remain at the top level of the
58 instance namespace will be instance.hypervisor_type, specifying not
59 only the hypervisor type to be used for that instance, but also
60 implicitly the hypervisor type to use for parameter checks.
62 All other instance level hypervisor parameters will be moved into the
63 instance.hypervisor_params namespace subtree.
65 The names for hypervisor parameters in the instance.hypervisor_params
66 subtree should be choosen as generic as possible, especially if
67 specific parameters could conceivably be useful for more than one
69 instance.hypervisor_params.vnc_console_port instead of using both
70 instance.hypervisor_params.hvm_vnc_console_port and
71 instance.hypervisor_params.kvm_vnc_console_port.
73 The instance.hypervisor_params subtree will be implemented as a dict.
75 Examples for instance level hypervisor parameters:
77 :boot_order: boot device order
78 :vnc_bind_address: bind address for VNC console
79 :vnc_bind_port: bind port for VNC console
80 :kernel_path: path to the kernel binary
81 :disk_type: type of the virtual disk interface
83 With this design, hypervisor specific parameters for disk and NIC
84 devices are defined globally for all devices of that type in the instance.
85 It may become necessary later to allow setting these parameters on a
86 per device basis, which will require design changes to the cluster
89 All other, non hypervisor related parameters of the instance remain at
90 the top level of the instance namespace. This includes:
101 Hypervisor support requirements
102 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104 To support the new cluster parameter design, additional features will
105 be required from the hypervisor support implementations in Ganeti.
107 The hypervisor support implementation API will be extended with the
110 :GetValidClusterParameters(): returns a list of valid cluster level
111 parameters for this hypervisor,
112 :GetValidInstanceParameters(): provide a list of valid instance level
113 parameters for this hypervisor,
114 :VerifyParameter(parameter_name, parameter_value): verifies the
115 provided parameter against this hypervisor:
117 - if the provided parameter name is valid for this hypervisor
118 - if applicable, if the provided value is valid for this hypervisor
120 The VerifyParameter(..) function will return True or False.
123 The parameter validation will be used for every addition or change of
124 hypervisor parameters.