def start_greenplum(env=None): with open("/tmp/active_master_host", "w") as fh: fh.write(str(active_master_helper.get_active_master_host())) if active_master_helper.is_localhost_active_master(): check_port_conflict() # Proceed only if there is no port conflict if is_greenplum_initialized(): execute_start_command(env=None) else: init_greenplum(env=None) # Init will start the database as well else: Logger.info("This host is not the active master, skipping requested operation.")
def start_greenplum(env=None): with open("/tmp/active_master_host", "w") as fh: fh.write(str(active_master_helper.get_active_master_host())) if active_master_helper.is_localhost_active_master(): check_port_conflict() # Proceed only if there is no port conflict if is_greenplum_initialized(): execute_start_command(env=None) else: init_greenplum(env=None) # Init will start the database as well else: Logger.info( "This host is not the active master, skipping requested operation." )
def service_check(self, env): import params self.active_master_host = active_master_helper.get_active_master_host() gpdb.verify_segments_state(env, self.active_master_host) self.drop_table() try: self.create_table() self.insert_data() self.query_data() self.check_data_correctness() self.cleanup() except: self.cleanup() raise