def main(): try: signal.signal(signal.SIGINT, exit_gracefully) if (arg == "setup" and not options.disable_spec) \ or (arg == "health_check" and (health_args == [] or "checkos" in health_args)): system_checking() if arg == "health_check": handler[arg](" ".join(health_args)) else: handler[arg](options, is_upgrade) except Exception as e: logger.error(error(str(e) + "\nException Occured, see /tmp/install.log for details" )) logger.debug(traceback.format_exc()) failover(options.chorus_path, options.data_path, is_upgrade)
def main(): try: signal.signal(signal.SIGINT, exit_gracefully) if (arg == "setup" and not options.disable_spec) \ or (arg == "health_check" and (health_args == [] or "checkos" in health_args)): system_checking() if arg == "health_check": handler[arg](" ".join(health_args)) else: handler[arg](options, is_upgrade) except Exception as e: logger.error(error(str(e) + "\n" + text.get("error_msg", "exception") % log_path)) logger.debug(traceback.format_exc()) failover(options.chorus_path, options.data_path, is_upgrade) exit(1)
def main(): try: signal.signal(signal.SIGINT, exit_gracefully) if (arg == "setup" and not options.disable_spec) \ or (arg == "health_check" and (health_args == [] or "checkos" in health_args)): system_checking() if arg == "health_check": handler[arg](" ".join(health_args)) else: handler[arg](options, is_upgrade) except Exception as e: logger.error( error( str(e) + "\n" + text.get("error_msg", "exception") % log_path)) logger.debug(traceback.format_exc()) failover(options.chorus_path, options.data_path, is_upgrade) exit(1)
def exit_gracefully(signum, frame): #print "\nSetup aborted, Cancelled by user" print failover(options.chorus_path, options.data_path, is_upgrade) sys.exit(1)