Get rid of the default_hypervisor slot
Currently we have both a default_hypervisor and an enabled_hypervisors list. The former is only settable at cluster init time, while the latter can be changed with cluster modify. This becomes cumbersome in a few ways: at cluster init time for example if we pass in a list of enabled hypervisors which doesn't include the "default" xen-pvm one, we're also forced to pass a default hypervisor, or an error will be reported. It is also currently possible to disable the default hypervisor in cluster-modify (with unknown results). In order to avoid this we get rid of this field altogether, and define the "first" enabled hypervisor as the default one. This allows ease of changing which one is the default, and at the same time maintains coherency. At configuration upgrade we make sure that the old default is first in the list, so that 2.0 cluster defaults are preserved. Signed-off-by:Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Showing
- lib/bootstrap.py 1 addition, 2 deletionslib/bootstrap.py
- lib/cmdlib.py 1 addition, 1 deletionlib/cmdlib.py
- lib/config.py 1 addition, 1 deletionlib/config.py
- lib/objects.py 8 additions, 0 deletionslib/objects.py
- man/gnt-cluster.sgml 3 additions, 9 deletionsman/gnt-cluster.sgml
- scripts/gnt-cluster 2 additions, 17 deletionsscripts/gnt-cluster
- test/ganeti.config_unittest.py 1 addition, 1 deletiontest/ganeti.config_unittest.py
Loading
Please register or sign in to comment