'verify': 'had web verification errors',
'backup_failure': 'had a backup failure',
'blacklisted': 'were blacklisted',
+ 'db': 'had database errors',
+ 'quota': 'had too low quota',
+ 'permissions': 'had insufficient permissions for upgrade'
}
if options.remerge:
os.unlink(os.path.join(options.log_dir, 'merge.txt'))
# This should actually be a warning, but it's a really common error
logging.info("[%04d] Could not verify application at %s", i, url)
status.write("verify", i, url)
+ elif e.name == "DatabaseVerificationError":
+ logging.info("[%04d] Could not verify database ast %s", i, d.location)
+ status.write("db", i, d.location)
elif e.name == "NotMigratedError":
logging.info("[%04d] Application not migrated at %s", i, d.location)
status.write("not_migrated", i, d.location)
elif e.name == "BackupFailure":
logging.info("[%04d] Failed backups at %s", i, d.location)
status.write("backup_failure", i, d.location)
+ elif e.name == "QuotaTooLow":
+ logging.info("[%04d] Quota too low at %s", i, d.location)
+ status.write("quota", i, d.location)
+ elif e.name == "PermissionsError":
+ logging.info("[%04d] Insufficient permissions to upgrade %s", i, d.location)
+ status.write("permissions", i, d.location)
else:
errors.setdefault(e.name, []).append(d)
logging.error("[%04d] %s in %s", i, e.name, d.location)
for name, deploys in errors.items():
logging.warning("%s from %d installs", name, len(deploys))
print
+ total = sum(len(x.values) for x in status.reports.values())
def printPercent(description, number):
- print "% 4d out of % 4d installs (% 5.1f%%) %s" % (number, i, float(number)/i*100, description)
+ print "% 4d out of % 4d installs (% 5.1f%%) %s" % (number, total, float(number)/total*100, description)
error_count = sum(len(e) for e in errors.values())
if error_count:
printPercent("had unusual errors", error_count)