TODO NOW:
+- Wipe temp directories if the upgrade succeeds
+- Put temp directories on tmpfs before merging, then move to disk if it
+ fails
+- Fix exception parsing when we print HTML
+
- Implement "group" filtering using blanche for limited rollouts.
- Remove "already migrated" cruft that will accumulate if we do small
upgrade Upgrades an autoinstall to the latest version
Administrative commands:
+ blacklist Marks an autoinstall to not try upgrades
errors Lists all broken autoinstall metadata
list Lists autoinstalls, with optional filtering
mass-migrate Performs mass migration of autoinstalls of an application
baton.add("--no-parallelize", dest="no_parallelize", action="store_true",
default=False, help="Turn off parallelization")
baton.add("--max-processes", dest="max_processes", type="int", metavar="N",
- default=40, help="Maximum subprocesses to run concurrently")
+ default=10, help="Maximum subprocesses to run concurrently")
baton.add("--limit", dest="limit", type="int",
default=None, help="Limit the number of autoinstalls to look at.")
baton.add("--user", "-u", dest="user",
sh.call("mysqldump", "--compress", "-r", outfile, *get_mysql_args(deployment))
sh.call("gzip", "--best", outfile)
except shell.CallError as e:
+ shutil.rmtree(outdir)
raise app.BackupFailure(e.stderr)
return backup
def restore(self, deployment, backup, options):
--- /dev/null
+import logging
+import os
+import optparse
+import sys
+import distutils.version
+
+from wizard import command, deploy, git, shell, util
+
+def main(argv, baton):
+ options, args = parse_args(argv, baton)
+ if not args:
+ reason = ""
+ else:
+ reason = args[0]
+ sh = shell.Shell()
+ if os.path.exists(".git/WIZARD_REPO"):
+ util.chdir(sh.eval('git', 'config', 'remote.origin.url'))
+ open('.scripts/blacklisted', 'w').write(reason + "\n")
+
+def parse_args(argv, baton):
+ usage = """usage: %prog blacklist [ARGS] [REASON]
+
+Touches .scripts/blacklisted so that we don't attempt
+to upgrade the script in the future."""
+ parser = command.WizardOptionParser(usage)
+ options, args = parser.parse_all(argv)
+ if len(args) > 1:
+ parser.error("too many arguments")
+ return options, args
+