Commit aa2de946 authored by Helga Velroyen's avatar Helga Velroyen

Prepare master branch for new devel cycle

Bump various versions to 2.16 and remove downgrade code
from cfgupgrade. Also adapt cfgupgrade tests.
Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent cc91b777
......@@ -1778,6 +1778,7 @@ TEST_FILES = \
test/data/cluster_config_2.12.json \
test/data/cluster_config_2.13.json \
test/data/cluster_config_2.14.json \
test/data/cluster_config_2.15.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.16.0
--------------
*(unreleased)*
Version 2.15.0
--------------
......
Ganeti 2.14
Ganeti 2.15
===========
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], [15])
m4_define([gnt_version_minor], [16])
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.14
Documents Ganeti version 2.16
.. contents::
......
Ganeti automatic instance allocation
====================================
Documents Ganeti version 2.14
Documents Ganeti version 2.16
.. contents::
......
Security in Ganeti
==================
Documents Ganeti version 2.14
Documents Ganeti version 2.16
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.14
Documents Ganeti version 2.16
.. contents::
......
......@@ -59,11 +59,11 @@ from ganeti.utils import version
#: Target major version we will upgrade to
TARGET_MAJOR = 2
#: Target minor version we will upgrade to
TARGET_MINOR = 15
TARGET_MINOR = 16
#: Target major version for downgrade
DOWNGRADE_MAJOR = 2
#: Target minor version for downgrade
DOWNGRADE_MINOR = 14
DOWNGRADE_MINOR = 15
# map of legacy device types
# (mapping differing old LD_* constants to new DT_* constants)
......@@ -183,8 +183,8 @@ class CfgUpgrade(object):
self._Downgrade(config_major, config_minor, config_version,
config_revision)
# Upgrade from 2.{0..14} to 2.15
elif config_major == 2 and config_minor in range(0, 15):
# Upgrade from 2.{0..15} to 2.16
elif config_major == 2 and config_minor in range(0, 16):
if config_revision != 0:
logging.warning("Config revision is %s, not 0", config_revision)
if not self.UpgradeAll():
......@@ -685,16 +685,7 @@ class CfgUpgrade(object):
# DOWNGRADE ------------------------------------------------------------
@classmethod
def DowngradeCollectors(cls, collectors):
if constants.DATA_COLLECTOR_XEN_CPU_LOAD in collectors:
del collectors[constants.DATA_COLLECTOR_XEN_CPU_LOAD]
def DowngradeCluster(self, cluster):
self.DowngradeCollectors(cluster["data_collectors"])
def DowngradeAll(self):
self.DowngradeCluster(self.config_data["cluster"])
self.config_data["version"] = version.BuildVersion(DOWNGRADE_MAJOR,
DOWNGRADE_MINOR, 0)
return True
......
This diff is collapsed.
......@@ -426,6 +426,9 @@ class TestCfgupgrade(unittest.TestCase):
def testUpgradeFullConfigFrom_2_14(self):
self._TestUpgradeFromFile("cluster_config_2.14.json", False)
def testUpgradeFullConfigFrom_2_15(self):
self._TestUpgradeFromFile("cluster_config_2.15.json", False)
def testUpgradeCurrent(self):
self._TestSimpleUpgrade(constants.CONFIG_VERSION, False)
......@@ -443,7 +446,7 @@ 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.14.json"
oldconfname = "cluster_config_2.15.json"
self._TestUpgradeFromFile(oldconfname, False)
_RunUpgrade(self.tmpdir, False, True, downgrade=True)
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