Commit 2cc31526 authored by Hrvoje Ribicic's avatar Hrvoje Ribicic

Prepare master branch for 2.14 devel cycle

Bump versions in various places to 2.14 and remove the downgrade code
from cfgupgrade.
Signed-off-by: default avatarHrvoje Ribicic <riba@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent d8982620
......@@ -1607,6 +1607,7 @@ TEST_FILES = \
test/data/cluster_config_2.10.json \
test/data/cluster_config_2.11.json \
test/data/cluster_config_2.12.json \
test/data/cluster_config_2.13.json \
test/data/instance-minor-pairing.txt \
test/data/instance-disks.txt \
test/data/ip-addr-show-dummy0.txt \
......
......@@ -2,6 +2,12 @@ News
====
Version 2.14.0
--------------
*(unreleased)*
Version 2.13.0
--------------
......
Ganeti 2.13
Ganeti 2.14
===========
For installation instructions, read the INSTALL and the doc/install.rst
......
# Configure script for Ganeti
m4_define([gnt_version_major], [2])
m4_define([gnt_version_minor], [13])
m4_define([gnt_version_minor], [14])
m4_define([gnt_version_revision], [0])
m4_define([gnt_version_suffix], [~alpha1])
m4_define([gnt_version_full],
......
Ganeti customisation using hooks
================================
Documents Ganeti version 2.13
Documents Ganeti version 2.14
.. contents::
......
Security in Ganeti
==================
Documents Ganeti version 2.13
Documents Ganeti version 2.14
Ganeti was developed to run on internal, trusted systems. As such, the
security model is all-or-nothing.
......
Virtual cluster support
=======================
Documents Ganeti version 2.13
Documents Ganeti version 2.14
.. contents::
......
This diff is collapsed.
......@@ -411,6 +411,9 @@ class TestCfgupgrade(unittest.TestCase):
def testUpgradeFullConfigFrom_2_12(self):
self._TestUpgradeFromFile("cluster_config_2.12.json", False)
def testUpgradeFullConfigFrom_2_13(self):
self._TestUpgradeFromFile("cluster_config_2.13.json", False)
def testUpgradeCurrent(self):
self._TestSimpleUpgrade(constants.CONFIG_VERSION, False)
......@@ -428,11 +431,12 @@ class TestCfgupgrade(unittest.TestCase):
def testDowngradeFullConfig(self):
"""Test for upgrade + downgrade combination."""
# This test can work only with the previous version of a configuration!
oldconfname = "cluster_config_2.12.json"
oldconfname = "cluster_config_2.13.json"
self._TestUpgradeFromFile(oldconfname, False)
_RunUpgrade(self.tmpdir, False, True, downgrade=True)
oldconf = self._LoadTestDataConfig(oldconfname)
newconf = self._LoadConfig()
self.maxDiff = None
self.assertEqual(oldconf, newconf)
def testDowngradeFullConfigBackwardFrom_2_7(self):
......
......@@ -63,11 +63,11 @@ args = None
#: Target major version we will upgrade to
TARGET_MAJOR = 2
#: Target minor version we will upgrade to
TARGET_MINOR = 13
TARGET_MINOR = 14
#: Target major version for downgrade
DOWNGRADE_MAJOR = 2
#: Target minor version for downgrade
DOWNGRADE_MINOR = 12
DOWNGRADE_MINOR = 13
# map of legacy device types
# (mapping differing old LD_* constants to new DT_* constants)
......@@ -470,40 +470,11 @@ def UpgradeAll(config_data):
# DOWNGRADE ------------------------------------------------------------
def DowngradeExtAccess(config_data):
# Remove 'access' for ext storage from cluster diskparams
cluster_extparams = config_data["cluster"]["diskparams"].get("ext", None)
if (cluster_extparams is not None and
"access" in cluster_extparams):
del cluster_extparams["access"]
# Remove 'access' for ext storage from nodegroup diskparams
for group in config_data["nodegroups"].values():
group_extparams = group["diskparams"].get("ext", None)
if (group_extparams is not None and
"access" in group_extparams):
del group_extparams["access"]
def DowngradeDataCollectors(config_data):
cluster = config_data["cluster"]
if "data_collectors" in cluster:
del cluster["data_collectors"]
def DowngradeFilters(config_data):
if "filters" in config_data:
del config_data["filters"]
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)
DowngradeExtAccess(config_data)
DowngradeDataCollectors(config_data)
DowngradeFilters(config_data)
def _ParseOptions():
......@@ -674,8 +645,8 @@ def main():
_Downgrade(config_major, config_minor, config_version, config_data,
config_revision)
# Upgrade from 2.{0..12} to 2.13
elif config_major == 2 and config_minor in range(0, 13):
# Upgrade from 2.{0..13} to 2.14
elif config_major == 2 and config_minor in range(0, 14):
if config_revision != 0:
logging.warning("Config revision is %s, not 0", config_revision)
UpgradeAll(config_data)
......
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