Motr  M0
Conf-ha

Data Structures

struct  m0_conf_ha_process
 
struct  m0_conf_ha_service
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF
 

Enumerations

enum  m0_conf_ha_process_event {
  M0_CONF_HA_PROCESS_STARTING, M0_CONF_HA_PROCESS_STARTED, M0_CONF_HA_PROCESS_STOPPING, M0_CONF_HA_PROCESS_STOPPED,
  M0_CONF_HA_PROCESS_DTM_RECOVERED
}
 
enum  m0_conf_ha_process_type { M0_CONF_HA_PROCESS_OTHER, M0_CONF_HA_PROCESS_KERNEL, M0_CONF_HA_PROCESS_M0MKFS, M0_CONF_HA_PROCESS_M0D }
 
enum  m0_conf_ha_service_event {
  M0_CONF_HA_SERVICE_STARTING, M0_CONF_HA_SERVICE_STARTED, M0_CONF_HA_SERVICE_STOPPING, M0_CONF_HA_SERVICE_STOPPED,
  M0_CONF_HA_SERVICE_FAILED
}
 

Functions

M0_INTERNAL void m0_conf_ha_process_event_post (struct m0_ha *ha, struct m0_ha_link *hl, const struct m0_fid *process_fid, uint64_t pid, enum m0_conf_ha_process_event event, enum m0_conf_ha_process_type type)
 
M0_INTERNAL void m0_conf_ha_service_event_post (struct m0_ha *ha, struct m0_ha_link *hl, const struct m0_fid *source_process_fid, const struct m0_fid *source_service_fid, const struct m0_fid *service_fid, uint64_t pid, enum m0_conf_ha_service_event event, enum m0_conf_service_type service_type)
 
struct m0_conf_ha_process M0_XCA_DOMAIN (rpc)
 

Variables

enum m0_conf_ha_service_event M0_XCA_DOMAIN
 

Detailed Description

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 30 of file ha.c.

Enumeration Type Documentation

◆ m0_conf_ha_process_event

Process event.

  • it's sent from a process and it's about the process;
  • it's a reliable information about the process state;
  • if process fails these notifications are not sent.
Enumerator
M0_CONF_HA_PROCESS_STARTING 

The process is about to start. Usually this notification is sent after connection to HA is established, but it may not be the first m0_ha_msg sent from the process.

M0_CONF_HA_PROCESS_STARTED 

The process is fully started and its services can handle requests.

M0_CONF_HA_PROCESS_STOPPING 

The process is about to stop. New connections to the services from this process shouldn't be made after this notification is sent (exception: if connections are required during the "stopping" phase).

M0_CONF_HA_PROCESS_STOPPED 

Process is stopped. No new connections should be made after this point. Usually this notification is sent just before process disconnects from HA, but it may not be the last m0_ha_msg sent from the process.

M0_CONF_HA_PROCESS_DTM_RECOVERED 

When the process has completed the iteration of the DTM log and there’re no new records to send to the recovering process it sends "REDO_END" message. When recovering process receives "REDO_END" from all ONLINE and TRANSIENT processes of the cluster it completes the recovery and sends M0_CONF_HA_PROCESS_DTM_RECOVERED() to HARE. If any process goes PERMANENT during DTM recovery the process being recovered shall not wait "REDO_END" from this process.

Definition at line 49 of file ha.h.

◆ m0_conf_ha_process_type

Defines the source of the process event

Enumerator
M0_CONF_HA_PROCESS_OTHER 

Source is not defined. Example: the source is a debugging tool.

M0_CONF_HA_PROCESS_KERNEL 

The event is sent from kernel (only m0t1fs can send this atm).

M0_CONF_HA_PROCESS_M0MKFS 

The event is sent from m0mkfs

M0_CONF_HA_PROCESS_M0D 

The event is sent from m0d

Definition at line 86 of file ha.h.

◆ m0_conf_ha_service_event

Service event.

  • it's sent from a process with the service and it's about the service;
  • it's a reliable information about the service state;
  • if process fails these notifications are not sent;
  • if service fails but process is alive these notifications are sent.
Enumerator
M0_CONF_HA_SERVICE_STARTING 

Service is about to start. There is no point in connecting to the service before this notification is sent.

M0_CONF_HA_SERVICE_STARTED 

Service is started and it can handle requests.

M0_CONF_HA_SERVICE_STOPPING 

Service is about to stop. New connections to the service shouldn't be made after this notification is sent if the connections are not a part of "stopping" phase.

M0_CONF_HA_SERVICE_STOPPED 

Service is stopped. There is no point in connecting to the service after this notification is sent.

M0_CONF_HA_SERVICE_FAILED 

Service failed during the starting phase. There is no point in connecting to the service if it's failed.

Definition at line 119 of file ha.h.

Function Documentation

◆ m0_conf_ha_process_event_post()

M0_INTERNAL void m0_conf_ha_process_event_post ( struct m0_ha ha,
struct m0_ha_link hl,
const struct m0_fid process_fid,
uint64_t  pid,
enum m0_conf_ha_process_event  event,
enum m0_conf_ha_process_type  type 
)

Sends notification about process state to HA

Definition at line 45 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_conf_ha_service_event_post()

M0_INTERNAL void m0_conf_ha_service_event_post ( struct m0_ha ha,
struct m0_ha_link hl,
const struct m0_fid source_process_fid,
const struct m0_fid source_service_fid,
const struct m0_fid service_fid,
uint64_t  pid,
enum m0_conf_ha_service_event  event,
enum m0_conf_service_type  service_type 
)

Sends notification about service state to HA

Definition at line 80 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ M0_XCA_DOMAIN()

struct m0_conf_ha_process M0_XCA_DOMAIN ( rpc  )

Variable Documentation

◆ M0_XCA_DOMAIN

enum m0_conf_ha_service_event M0_XCA_DOMAIN