def _process_event_cb(self, fid, chp_event, chp_type, chp_pid): LOG.info('fid=%s, chp_event=%s', fid, chp_event) self.queue.put( ProcessEvent( ConfHaProcess(chp_event=chp_event, chp_type=chp_type, chp_pid=chp_pid, fid=fid)))
def _process_event_cb(self, fid, chp_event, chp_type, chp_pid): logging.info('fid=%s, chp_event=%s', fid, chp_event) self.queue.put( ProcessEvent( ConfHaProcess(chp_event=chp_event, chp_type=chp_type, chp_pid=chp_pid, fid=fid))) if chp_event == 3: self.queue.put( BroadcastHAStates(states=[HAState(fid=fid, status='offline')], reply_to=None))
def _process_event_cb(self, fid, chp_event, chp_type, chp_pid): LOG.info('fid=%s, chp_event=%s', fid, chp_event) self.queue.put( ProcessEvent( ConfHaProcess(chp_event=chp_event, chp_type=chp_type, chp_pid=chp_pid, fid=fid))) if chp_event == 3: self.queue.put( BroadcastHAStates( states=[HAState(fid=fid, status=ServiceHealth.FAILED)], reply_to=None))
def _process_event_cb(self, fid, chp_event, chp_type, chp_pid): LOG.info('fid=%s, chp_event=%s', fid, chp_event) self.planner.add_command( ProcessEvent( ConfHaProcess(chp_event=chp_event, chp_type=chp_type, chp_pid=chp_pid, fid=fid))) if chp_event == m0HaProcessEvent.M0_CONF_HA_PROCESS_STOPPED: proc_ep = self.consul_util.fid_to_endpoint(fid) if proc_ep: self._ffi.hax_link_stopped(self._ha_ctx, make_c_str(proc_ep))
def _process_event_cb(self, fid, chp_event, chp_type, chp_pid): LOG.info('fid=%s, chp_event=%s', fid, chp_event) self.queue.put( ProcessEvent( ConfHaProcess(chp_event=chp_event, chp_type=chp_type, chp_pid=chp_pid, fid=fid))) if chp_type == m0HaProcessType.M0_CONF_HA_PROCESS_M0D: if chp_event == m0HaProcessEvent.M0_CONF_HA_PROCESS_STARTED: self.queue.put( BroadcastHAStates( states=[HAState(fid=fid, status=ServiceHealth.OK)], reply_to=None))
def process_event(): return ProcessEvent( ConfHaProcess(chp_event=0, chp_type=0, chp_pid=0, fid=Fid(0, 0)))