Commit 5705bba1 authored by Klaus Aehlig's avatar Klaus Aehlig

Add default values for hv_state_static and disk_state_static

When parsing the cluster configuration, accept that "hv_state_static"
and "disk_state_static" can be missing; in this case, just use the
default value. This follows the implicit upgrade that was present
for these parameters in the python code all the time. In this way,
upgrading from very old versions of Ganeti runs more smoothly
(issue 1019).
Signed-off-by: default avatarKlaus Aehlig <>
Reviewed-by: default avatarHelga Velroyen <>
parent d1c125e4
......@@ -848,8 +848,10 @@ $(buildObject "Cluster" "cluster" $
, simpleField "primary_ip_family" [t| IpFamily |]
, simpleField "prealloc_wipe_disks" [t| Bool |]
, simpleField "ipolicy" [t| FilledIPolicy |]
, simpleField "hv_state_static" [t| HypervisorState |]
, simpleField "disk_state_static" [t| DiskState |]
, defaultField [| emptyContainer |] $
simpleField "hv_state_static" [t| HypervisorState |]
, defaultField [| emptyContainer |] $
simpleField "disk_state_static" [t| DiskState |]
, simpleField "enabled_disk_templates" [t| [DiskTemplate] |]
, simpleField "candidate_certs" [t| CandidateCertificates |]
, simpleField "max_running_jobs" [t| Int |]
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment