Update config version number when downgrading
authorMichele Tartara <mtartara@google.com>
Tue, 18 Jun 2013 07:32:31 +0000 (07:32 +0000)
committerMichele Tartara <mtartara@google.com>
Tue, 18 Jun 2013 08:11:47 +0000 (10:11 +0200)
The downgrade option of the cfgupgrade tool was not changing the version
number in the configuration file of the cluster while performing the
downgrade.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

tools/cfgupgrade

index 0508387..1ba52ed 100755 (executable)
@@ -321,6 +321,8 @@ def DowngradeInstances(config_data):
 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"] = constants.BuildVersion(DOWNGRADE_MAJOR,
+                                                  DOWNGRADE_MINOR, 0)
   DowngradeCluster(config_data)
   DowngradeGroups(config_data)
   DowngradeInstances(config_data)