def check_state(self): import params command = "source {0} && hawq state -d {1}".format(hawq_constants.hawq_greenplum_path_file, params.hawq_master_dir) Logger.info("Executing hawq status check..") (retcode, out, err) = exec_ssh_cmd(self.active_master_host, command) if retcode: Logger.error("hawq state command returned non-zero result: {0}. Out: {1} Error: {2}".format(retcode, out, err)) raise Fail("Unexpected result of hawq state command.") Logger.info("Output of command:\n{0}".format(str(out) + "\n"))
def __is_standby_initialized(): """ Returns True if HAWQ Standby Master is initialized, False otherwise """ import params file_path = os.path.join(params.hawq_master_dir, constants.postmaster_opts_filename) (retcode, _, _) = utils.exec_ssh_cmd(__get_standby_host(), "[ -f {0} ]".format(file_path)) return retcode == 0
def check_state(self): import params command = "source {0} && hawq state -d {1}".format( hawqconstants.hawq_greenplum_path_file, params.hawq_master_dir) Logger.info("Executing hawq status check..") (retcode, out, err) = exec_ssh_cmd(self.active_master_host, command) if retcode: Logger.error( "hawq state command returned non-zero result: {0}. Out: {1} Error: {2}" .format(retcode, out, err)) raise Fail("Unexpected result of hawq state command.") Logger.info("Output of command:\n{0}".format(str(out) + "\n"))
def check_state(self): """ Checks state of HAWQ cluster """ import params Logger.info("--- Check state of HAWQ cluster ---") try: command = "source {0} && hawq state -d {1}".format(hawq_constants.hawq_greenplum_path_file, params.hawq_master_dir) Logger.info("Executing hawq status check...") (retcode, out, err) = exec_ssh_cmd(self.active_master_host, command) if retcode: Logger.error("SERVICE CHECK FAILED: hawq state command returned non-zero result: {0}. Out: {1} Error: {2}".format(retcode, out, err)) raise Fail("Unexpected result of hawq state command.") Logger.info("Output of command:\n{0}".format(str(out) + "\n")) except: self.checks_failed += 1