⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fsa_defines.h

📁 linux集群服务器软件代码包
💻 H
📖 第 1 页 / 共 2 页
字号:
 * Some of the actions below will always occur together for now, but I can * forsee that this may not always be the case.  So I've spilt them up so * that if they ever do need to be called independantly in the future, it * wont be a problem.  * * For example, separating A_LRM_CONNECT from A_STARTUP might be useful  * if we ever try to recover from a faulty or disconnected LRM. * *======================================*/	 /* Dont do anything */#define	A_NOTHING		0x0000000000000000ULL/* -- Startup actions -- */	/* Hook to perform any actions (other than starting the CIB,	 * connecting to HA or the CCM) that might be needed as part	 * of the startup.	 */#define	A_STARTUP		0x0000000000000001ULL	/* Hook to perform any actions that might be needed as part	 * after startup is successful.	 */#define	A_STARTED		0x0000000000000002ULL	/* Connect to Heartbeat */#define	A_HA_CONNECT		0x0000000000000004ULL#define	A_HA_DISCONNECT		0x0000000000000008ULL#define	A_INTEGRATE_TIMER_START	0x0000000000000010ULL#define	A_INTEGRATE_TIMER_STOP	0x0000000000000020ULL#define	A_FINALIZE_TIMER_START	0x0000000000000040ULL#define	A_FINALIZE_TIMER_STOP	0x0000000000000080ULL/* -- Election actions -- */#define	A_DC_TIMER_START	0x0000000000000100ULL#define	A_DC_TIMER_STOP		0x0000000000000200ULL#define	A_ELECTION_COUNT	0x0000000000000400ULL#define	A_ELECTION_VOTE		0x0000000000000800ULL#define A_ELECTION_START	0x0000000000001000ULL/* -- Message processing -- */	/* Process the queue of requests */#define	A_MSG_PROCESS		0x0000000000002000ULL	/* Send the message to the correct recipient */#define	A_MSG_ROUTE		0x0000000000004000ULL	/* Send a welcome message to new node(s) */#define	A_DC_JOIN_OFFER_ONE	0x0000000000008000ULL/* -- Server Join protocol actions -- */	/* Send a welcome message to all nodes */#define	A_DC_JOIN_OFFER_ALL	0x0000000000010000ULL	/* Process the remote node's ack of our join message */ #define	A_DC_JOIN_PROCESS_REQ	0x0000000000020000ULL	/* Send out the reults of the Join phase */ #define	A_DC_JOIN_FINALIZE	0x0000000000040000ULL	/* Send out the reults of the Join phase */ #define	A_DC_JOIN_PROCESS_ACK	0x0000000000080000ULL/* -- Client Join protocol actions -- */#define	A_CL_JOIN_QUERY		0x0000000000100000ULL#define	A_CL_JOIN_ANNOUNCE	0x0000000000200000ULL	/* Request membership to the DC list */#define	A_CL_JOIN_REQUEST	0x0000000000400000ULL	/* Did the DC accept or reject the request */#define	A_CL_JOIN_RESULT	0x0000000000800000ULL/* -- Recovery, DC start/stop -- */	/* Something bad happened, try to recover */#define	A_RECOVER		0x0000000001000000ULL	/* Hook to perform any actions (apart from starting, the TE, PE 	 * and gathering the latest CIB) that might be necessary before 	 * giving up the responsibilities of being the DC.	 */#define	A_DC_RELEASE		0x0000000002000000ULL	/* */#define	A_DC_RELEASED		0x0000000004000000ULL	/* Hook to perform any actions (apart from starting, the TE, PE	 * and gathering the latest CIB) that might be necessary before	 * taking over the responsibilities of being the DC.	 */#define	A_DC_TAKEOVER		0x0000000008000000ULL/* -- Shutdown actions -- */#define	A_SHUTDOWN		0x0000000010000000ULL#define	A_STOP			0x0000000020000000ULL#define	A_EXIT_0		0x0000000040000000ULL#define	A_EXIT_1		0x0000000080000000ULL#define	A_SHUTDOWN_REQ		0x0000000100000000ULL/* -- CCM actions -- */#define	A_CCM_CONNECT		0x0000001000000000ULL#define	A_CCM_DISCONNECT	0x0000002000000000ULL	/* Process whatever it is the CCM is trying to tell us.	 * This will generate inputs such as I_NODE_JOIN,	 * I_NODE_LEAVE, I_SHUTDOWN, I_DC_RELEASE, I_DC_TAKEOVER	 */#define	A_CCM_EVENT		0x0000004000000000ULL#define	A_CCM_UPDATE_CACHE	0x0000008000000000ULL/* -- CBI actions -- */#define	A_CIB_INVOKE		0x0000010000000000ULL#define	A_CIB_START		0x0000020000000000ULL#define	A_CIB_STOP		0x0000040000000000ULL#define A_CIB_INVOKE_LOCAL	0x0000080000000000ULL/* -- Transition Engine actions -- */	/* Attempt to reach the newly  calculated cluster state.  This is 	 * only called once per transition (except if it is asked to	 * stop the transition or start a new one).	 * Once given a cluster state to reach, the TE will determin	 * tasks that can be performed in parallel, execute them, wait	 * for replies and then determin the next set until the new	 * state is reached or no further tasks can be taken.	 */#define	A_TE_INVOKE		0x0000100000000000ULL#define	A_TE_START		0x0000200000000000ULL#define	A_TE_STOP		0x0000400000000000ULL#define	A_TE_CANCEL		0x0000800000000000ULL/* -- Policy Engine actions -- */	/* Calculate the next state for the cluster.  This is only	 * invoked once per needed calculation.	 */#define	A_PE_INVOKE		0x0001000000000000ULL#define	A_PE_START		0x0002000000000000ULL#define	A_PE_STOP		0x0004000000000000ULL/* -- Misc actions -- */	/* Add a system generate "block" so that resources arent moved	 * to or are activly moved away from the affected node.  This	 * way we can return quickly even if busy with other things.	 */#define	A_NODE_BLOCK		0x0010000000000000ULL	/* Update our information in the local CIB */#define A_UPDATE_NODESTATUS	0x0020000000000000ULL#define	A_CIB_BUMPGEN		0x0040000000000000ULL#define	A_READCONFIG		0x0080000000000000ULL/* -- LRM Actions -- */	/* Connect to the Local Resource Manager */#define	A_LRM_CONNECT		0x0100000000000000ULL	/* Disconnect from the Local Resource Manager */#define A_LRM_DISCONNECT	0x0200000000000000ULL#define A_LRM_INVOKE		0x0400000000000000ULL#define A_LRM_EVENT		0x0800000000000000ULL/* -- Logging actions -- */#define	A_LOG			0x1000000000000000ULL#define	A_ERROR			0x2000000000000000ULL#define	A_WARN			0x4000000000000000ULL#define O_SHUTDOWN (A_CCM_DISCONNECT|A_LRM_DISCONNECT|A_HA_DISCONNECT|A_SHUTDOWN|A_STOP|A_EXIT_0|A_CIB_STOP)#define O_RELEASE  (A_DC_TIMER_STOP|A_DC_RELEASE|A_PE_STOP|A_TE_STOP|A_DC_RELEASED)#define O_DC_TIMER_RESTART	(A_NOTHING)#define	O_PE_RESTART		(A_PE_START|A_PE_STOP)#define	O_TE_RESTART		(A_TE_START|A_TE_STOP)#define	O_CIB_RESTART		(A_CIB_START|A_CIB_STOP)#define O_DC_TICKLE O_DC_TIMER_RESTART/*====================================== * * "register" contents * * Things we may want to remember regardless of which state we are in. * * These also count as inputs for synthesizing I_* * *======================================*/#define	R_THE_DC	0x00000001ULL /* Are we the DC? */#define	R_STARTING	0x00000002ULL /* Are we starting up? */#define	R_SHUTDOWN	0x00000004ULL /* Are we trying to shut down? */#define	R_STAYDOWN	0x00000008ULL /* Should we restart? */#define R_JOIN_OK	0x00000010ULL /* Have we completed the join process */#define	R_HAVE_RES	0x00000040ULL /* Do we have any resources running					 locally */#define	R_INVOKE_PE	0x00000080ULL /* Does the PE needed to be invoked at					 the next appropriate point? */#define	R_CIB_CONNECTED	0x00000100ULL /* Is the CIB connected? */#define	R_PE_CONNECTED	0x00000200ULL /* Is the Policy Engine connected? */#define	R_TE_CONNECTED	0x00000400ULL /* Is the Transition Engine connected? */#define	R_LRM_CONNECTED	0x00000800ULL /* Is the Local Resource Manager					 connected? */#define	R_CIB_REQUIRED	0x00001000ULL /* Is the CIB required? */#define	R_PE_REQUIRED	0x00002000ULL /* Is the Policy Engine required? */#define	R_TE_REQUIRED	0x00004000ULL /* Is the Transition Engine required? */#define	R_REQ_PEND	0x01000000ULL /* Are there Requests waiting for					 processing? */#define	R_PE_PEND	0x02000000ULL /* Has the PE been invoked and we're					 awaiting a reply? */#define	R_TE_PEND	0x04000000ULL /* Has the TE been invoked and we're					 awaiting completion? */ #define	R_RESP_PEND	0x08000000ULL /* Do we have clients waiting on a					 response? if so perhaps we shouldnt					 stop yet */#define	R_CIB_DONE	0x00010000ULL /* Have we calculated the CIB? */#define R_HAVE_CIB	0x00020000ULL /* Do we have an up-to-date CIB */#define R_CIB_ASKED	0x00040000ULL /* Have we asked for an up-to-date CIB */#define R_CCM_DATA	0x00100000ULL /* Have we got CCM data yet */#define R_PEER_DATA	0x00200000ULL /* Have we got T_CL_STATUS data yet */enum crmd_fsa_cause{	C_UNKNOWN = 0,	C_STARTUP,	C_IPC_MESSAGE,	C_HA_MESSAGE,	C_CCM_CALLBACK,	C_CRMD_STATUS_CALLBACK,	C_LRM_OP_CALLBACK,	C_LRM_MONITOR_CALLBACK,	C_TIMER_POPPED,	C_SHUTDOWN,	C_HEARTBEAT_FAILED,	C_SUBSYSTEM_CONNECT,	C_HA_DISCONNECT,	C_FSA_INTERNAL,	C_ILLEGAL};extern const char *fsa_input2string(enum crmd_fsa_input input);extern const char *fsa_state2string(enum crmd_fsa_state state);extern const char *fsa_cause2string(enum crmd_fsa_cause cause);extern const char *fsa_action2string(long long action);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -