Motr  M0
Start_Stop Service

Enumerations

enum  { MAX_SERVICE_NAME_LEN = 128 }
 
enum  ss_fom_phases {
  SS_FOM_SWITCH = M0_FOPH_NR + 1, SS_FOM_SVC_INIT, SS_FOM_START, SS_FOM_START_WAIT,
  SS_FOM_QUIESCE, SS_FOM_STOP, SS_FOM_STATUS, SS_FOM_HEALTH
}
 

Functions

M0_INTERNAL int m0_ss_svc_init (void)
 
M0_INTERNAL void m0_ss_svc_fini (void)
 

Variables

struct m0_reqh_service_type m0_ss_svc_type
 

Detailed Description

Service command FOM

Functional Specification

Service commands provides control of individual service like init, quiesce, start, stop, status and health.

Generic TX fom phases start TX transaction. Its interfere to start some services, like IO service. So Start service made a separate stage. Both stages can to diagnose error and can go to Failure phase. Fom phase SS_FOM_SWITCH switch to next dependence Service command ID and current stage.

First stage - before TX generic fom phases:

Second stage - after TX generic fom phases:

State transition diagram for Start Service command

             Standard fom generic phases
    inits, authenticate, resources, authorization
                 |
                 v
    +<---------SS_FOM_SWITCH
    |                    |
    |                    v
    +<---------SS_FOM_START
    |                    |
    |                    v
    +<--Standard fom generic phases TX context
    |                    |
    |                    v
    +<---------SS_FOM_SWITCH
    |                    |
    |                    v
FOPH_FAILED        FOPH_SUCCESS
    +------------------>|
                 v
           Standard fom generic phases
              send reply and finish

State transition diagram for Service non-start commands

             Standard fom generic phases
    inits, authenticate, resources, authorization
                 |
                 v
    +<---------SS_FOM_SWITCH
    |                    |
    |                    v
    +<--Standard fom generic phases TX context
    |                    |
    |                    v
    +<---------SS_FOM_SWITCH
    |                    |
    |                    v
    +<------execute Service command by FOP command ID
    |                    |
    |                    v
FOPH_FAILED        FOPH_SUCCESS
    +------------------>|
                 v
           Standard fom generic phases
              send reply and finish

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_SERVICE_NAME_LEN 

Definition at line 114 of file ss_svc.h.

◆ ss_fom_phases

Enumerator
SS_FOM_SWITCH 
SS_FOM_SVC_INIT 
SS_FOM_START 
SS_FOM_START_WAIT 
SS_FOM_QUIESCE 
SS_FOM_STOP 
SS_FOM_STATUS 
SS_FOM_HEALTH 

Definition at line 118 of file ss_svc.h.

Function Documentation

◆ m0_ss_svc_fini()

M0_INTERNAL void m0_ss_svc_fini ( void  )

Definition at line 202 of file ss_svc.c.

Here is the call graph for this function:

◆ m0_ss_svc_init()

M0_INTERNAL int m0_ss_svc_init ( void  )

Definition at line 170 of file ss_svc.c.

Here is the call graph for this function:

Variable Documentation

◆ m0_ss_svc_type

struct m0_reqh_service_type m0_ss_svc_type

Definition at line 159 of file ss_svc.c.