Revert "Add 2.2->2.3 cluster upgrade function"
authorGuido Trotter <ultrotter@google.com>
Mon, 6 Sep 2010 14:11:33 +0000 (15:11 +0100)
committerGuido Trotter <ultrotter@google.com>
Mon, 6 Sep 2010 14:55:46 +0000 (15:55 +0100)
This reverts commit 2c9cf6bb05e14ea606638fce9680994cf92e8e24.
The change is better done in objects.py

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

tools/cfgupgrade

index f1df288..00dbb22 100755 (executable)
@@ -32,7 +32,6 @@ import os.path
 import sys
 import optparse
 import logging
-import socket
 
 from ganeti import constants
 from ganeti import serializer
@@ -71,16 +70,6 @@ def SetupLogging():
   root_logger.addHandler(stderr_handler)
 
 
-def Cluster22To23(cluster):
-  """Upgrades the cluster object from 2.2 to 2.3.
-
-  """
-  logging.info("Upgrading the cluster object")
-  if "primary_ip_family" not in cluster:
-    # Add primary ip family to config
-    cluster["primary_ip_family"] = socket.AF_INET
-
-
 def main():
   """Main program.
 
@@ -161,8 +150,6 @@ def main():
 
   elif config_major == 2 and config_minor == 2:
     logging.info("No changes necessary")
-    # TODO: For Ganeti 2.3 uncomment the following line
-    # Cluster22To23(config_data["cluster"])
 
   else:
     raise Error("Configuration version %d.%d.%d not supported by this tool" %