Merge branch 'stable-2.12' into stable-2.13
[ganeti-github.git] / tools / post-upgrade
index 0804de6..f611974 100644 (file)
@@ -61,6 +61,14 @@ def main():
                    (result.fail_reason, result.output))
       error_code = 1
 
+  if utils.version.IsBefore(version, 2, 13, 0):
+    result = utils.RunCmd(["gnt-cluster", "renew-crypto",
+                           "--new-ssh-keys", "--no-ssh-key-check", "-f"])
+    if result.failed:
+      cli.ToStderr("Failed to create SSH keys: %s; Output %s" %
+                   (result.fail_reason, result.output))
+      error_code = 1
+
   return error_code
 
 if __name__ == "__main__":