Revision 0359e5d0 tools/cfgupgrade

b/tools/cfgupgrade
147 147
  ipolicy = cluster.setdefault("ipolicy", None)
148 148
  if ipolicy:
149 149
    UpgradeIPolicy(ipolicy, constants.IPOLICY_DEFAULTS, False)
150
  ial_params = cluster.get("default_iallocator_params", None)
151
  if not ial_params:
152
    cluster["default_iallocator_params"] = {}
150 153

  
151 154

  
152 155
def UpgradeGroups(config_data):
......
398 401

  
399 402

  
400 403
def DowngradeCluster(config_data):
401
  DowngradeNdparams(config_data["cluster"])
404
  cluster = config_data.get("cluster", None)
405
  if not cluster:
406
    raise Error("Cannot find the 'cluster' key in the configuration!")
407
  DowngradeNdparams(cluster)
408
  if "default_iallocator_params" in cluster:
409
    del cluster["default_iallocator_params"]
402 410

  
403 411

  
404 412
def DowngradeGroups(config_data):

Also available in: Unified diff