Commit 661af328 authored by Klaus Aehlig's avatar Klaus Aehlig

Prepare master for the 2.17 development cycle

...by bumping minor version and resetting the
configuration downgrade function.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent b5b33f94
...@@ -1807,6 +1807,7 @@ TEST_FILES = \ ...@@ -1807,6 +1807,7 @@ TEST_FILES = \
test/data/cluster_config_2.13.json \ test/data/cluster_config_2.13.json \
test/data/cluster_config_2.14.json \ test/data/cluster_config_2.14.json \
test/data/cluster_config_2.15.json \ test/data/cluster_config_2.15.json \
test/data/cluster_config_2.16.json \
test/data/instance-minor-pairing.txt \ test/data/instance-minor-pairing.txt \
test/data/instance-disks.txt \ test/data/instance-disks.txt \
test/data/ip-addr-show-dummy0.txt \ test/data/ip-addr-show-dummy0.txt \
......
# Configure script for Ganeti # Configure script for Ganeti
m4_define([gnt_version_major], [2]) m4_define([gnt_version_major], [2])
m4_define([gnt_version_minor], [16]) m4_define([gnt_version_minor], [17])
m4_define([gnt_version_revision], [0]) m4_define([gnt_version_revision], [0])
m4_define([gnt_version_suffix], [~alpha1]) m4_define([gnt_version_suffix], [~alpha1])
m4_define([gnt_version_full], m4_define([gnt_version_full],
......
...@@ -59,11 +59,11 @@ from ganeti.utils import version ...@@ -59,11 +59,11 @@ from ganeti.utils import version
#: Target major version we will upgrade to #: Target major version we will upgrade to
TARGET_MAJOR = 2 TARGET_MAJOR = 2
#: Target minor version we will upgrade to #: Target minor version we will upgrade to
TARGET_MINOR = 16 TARGET_MINOR = 17
#: Target major version for downgrade #: Target major version for downgrade
DOWNGRADE_MAJOR = 2 DOWNGRADE_MAJOR = 2
#: Target minor version for downgrade #: Target minor version for downgrade
DOWNGRADE_MINOR = 15 DOWNGRADE_MINOR = 16
# map of legacy device types # map of legacy device types
# (mapping differing old LD_* constants to new DT_* constants) # (mapping differing old LD_* constants to new DT_* constants)
...@@ -183,8 +183,8 @@ class CfgUpgrade(object): ...@@ -183,8 +183,8 @@ class CfgUpgrade(object):
self._Downgrade(config_major, config_minor, config_version, self._Downgrade(config_major, config_minor, config_version,
config_revision) config_revision)
# Upgrade from 2.{0..15} to 2.16 # Upgrade from 2.{0..n-1} to 2.n
elif config_major == 2 and config_minor in range(0, 16): elif config_major == 2 and config_minor in range(0, TARGET_MINOR):
if config_revision != 0: if config_revision != 0:
logging.warning("Config revision is %s, not 0", config_revision) logging.warning("Config revision is %s, not 0", config_revision)
if not self.UpgradeAll(): if not self.UpgradeAll():
......
This diff is collapsed.
...@@ -429,6 +429,9 @@ class TestCfgupgrade(unittest.TestCase): ...@@ -429,6 +429,9 @@ class TestCfgupgrade(unittest.TestCase):
def testUpgradeFullConfigFrom_2_15(self): def testUpgradeFullConfigFrom_2_15(self):
self._TestUpgradeFromFile("cluster_config_2.15.json", False) self._TestUpgradeFromFile("cluster_config_2.15.json", False)
def testUpgradeFullConfigFrom_2_16(self):
self._TestUpgradeFromFile("cluster_config_2.16.json", False)
def testUpgradeCurrent(self): def testUpgradeCurrent(self):
self._TestSimpleUpgrade(constants.CONFIG_VERSION, False) self._TestSimpleUpgrade(constants.CONFIG_VERSION, False)
...@@ -446,7 +449,7 @@ class TestCfgupgrade(unittest.TestCase): ...@@ -446,7 +449,7 @@ class TestCfgupgrade(unittest.TestCase):
def testDowngradeFullConfig(self): def testDowngradeFullConfig(self):
"""Test for upgrade + downgrade combination.""" """Test for upgrade + downgrade combination."""
# This test can work only with the previous version of a configuration! # This test can work only with the previous version of a configuration!
oldconfname = "cluster_config_2.15.json" oldconfname = "cluster_config_2.16.json"
self._TestUpgradeFromFile(oldconfname, False) self._TestUpgradeFromFile(oldconfname, False)
_RunUpgrade(self.tmpdir, False, True, downgrade=True) _RunUpgrade(self.tmpdir, False, True, downgrade=True)
oldconf = self._LoadTestDataConfig(oldconfname) oldconf = self._LoadTestDataConfig(oldconfname)
......
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