Commit 4f7cc3c2 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Remove osparams_private_cluster on config downgrade



The new cluster parameter "osparams_private_cluster" was
newly introduced in 2.12. So remove it when downgrading
to 2.11.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHrvoje Ribicic <riba@google.com>
parent bcb1ab78
......@@ -402,11 +402,20 @@ def UpgradeAll(config_data):
# DOWNGRADE ------------------------------------------------------------
def DowngradeCluster(config_data):
cluster = config_data.get("cluster", None)
if not cluster:
raise Error("Cannot find the 'cluster' key in the configuration")
if "osparams_private_cluster" in cluster:
del cluster["osparams_private_cluster"]
def DowngradeAll(config_data):
# Any code specific to a particular version should be labeled that way, so
# it can be removed when updating to the next version.
config_data["version"] = version.BuildVersion(DOWNGRADE_MAJOR,
DOWNGRADE_MINOR, 0)
DowngradeCluster(config_data)
def main():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment