root/daemons/controld/controld_fsa.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright 2004-2025 the Pacemaker project contributors
   3  *
   4  * The version control history for this file may have further details.
   5  *
   6  * This source code is licensed under the GNU Lesser General Public License
   7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
   8  */
   9 
  10 #ifndef CRMD_FSA__H
  11 #  define CRMD_FSA__H
  12 
  13 #  include <crm/crm.h>
  14 #  include <crm/cib.h>
  15 #  include <crm/common/xml.h>
  16 #  include <crm/common/mainloop.h>
  17 #  include <crm/cluster.h>
  18 #  include <crm/cluster/election_internal.h>
  19 #  include <crm/common/ipc_internal.h>
  20 
  21 /*! States the controller can be in */
  22 enum crmd_fsa_state {
  23     S_IDLE = 0,                 /* Nothing happening */
  24 
  25     S_ELECTION,                 /* Take part in the election algorithm as
  26                                  * described below
  27                                  */
  28     S_INTEGRATION,              /* integrate that status of new nodes (which is
  29                                  * all of them if we have just been elected DC)
  30                                  * to form a complete and up-to-date picture of
  31                                  * the CIB
  32                                  */
  33     S_FINALIZE_JOIN,            /* integrate that status of new nodes (which is
  34                                  * all of them if we have just been elected DC)
  35                                  * to form a complete and up-to-date picture of
  36                                  * the CIB
  37                                  */
  38     S_NOT_DC,                   /* we are in non-DC mode */
  39     S_POLICY_ENGINE,            /* Determine next stable state of the cluster */
  40     S_RECOVERY,                 /* Something bad happened, check everything is ok
  41                                  * before continuing and attempt to recover if
  42                                  * required
  43                                  */
  44     S_RELEASE_DC,               /* we were the DC, but now we arent anymore,
  45                                  * possibly by our own request, and we should
  46                                  * release all unnecessary sub-systems, finish
  47                                  * any pending actions, do general cleanup and
  48                                  * unset anything that makes us think we are
  49                                  * special :)
  50                                  */
  51     S_STARTING,                 /* we are just starting out */
  52     S_PENDING,                  /* we are not a full/active member yet */
  53     S_STOPPING,                 /* We are in the final stages of shutting down */
  54     S_TERMINATE,                /* We are going to shutdown, this is the equiv of
  55                                  * "Sending TERM signal to all processes" in Linux
  56                                  * and in worst case scenarios could be considered
  57                                  * a self STONITH
  58                                  */
  59     S_TRANSITION_ENGINE,        /* Attempt to make the calculated next stable
  60                                  * state of the cluster a reality
  61                                  */
  62 
  63     S_HALT,                     /* Freeze - don't do anything
  64                                  * Something bad happened that needs the admin to fix
  65                                  * Wait for I_ELECTION
  66                                  */
  67 
  68     /*  ----------- Last input found in table is above ---------- */
  69     S_ILLEGAL                   /* This is an illegal FSA state */
  70         /* (must be last) */
  71 };
  72 
  73 #  define MAXSTATE S_ILLEGAL
  74 
  75 /*
  76       Once we start and do some basic sanity checks, we go into the
  77       S_NOT_DC state and await instructions from the DC or input from
  78       the cluster layer which indicates the election algorithm needs to run.
  79 
  80       If the election algorithm is triggered, we enter the S_ELECTION state
  81       from where we can either go back to the S_NOT_DC state or progress
  82       to the S_INTEGRATION state (or S_RELEASE_DC if we used to be the DC
  83       but aren't anymore). See the libcrmcluster API documentation for more
  84       information about the election algorithm.
  85 
  86       Once the election is complete, if we are the DC, we enter the
  87       S_INTEGRATION state which is a DC-in-waiting style state.  We are
  88       the DC, but we shouldn't do anything yet because we may not have an
  89       up-to-date picture of the cluster.  There may of course be times
  90       when this fails, so we should go back to the S_RECOVERY stage and
  91       check everything is ok.  We may also end up here if a new node came
  92       online, since each node is authoritative about itself, and we would want
  93       to incorporate its information into the CIB.
  94 
  95       Once we have the latest CIB, we then enter the S_POLICY_ENGINE state
  96       where invoke the scheduler. It is possible that between
  97       invoking the scheduler and receiving an answer, that we receive
  98       more input. In this case, we would discard the orginal result and
  99       invoke it again.
 100 
 101       Once we are satisfied with the output from the scheduler, we
 102       enter S_TRANSITION_ENGINE and feed the scheduler's output to the
 103       Transition Engine who attempts to make the scheduler's
 104       calculation a reality. If the transition completes successfully,
 105       we enter S_IDLE, otherwise we go back to S_POLICY_ENGINE with the
 106       current unstable state and try again.
 107 
 108       Of course, we may be asked to shutdown at any time, however we must
 109       progress to S_NOT_DC before doing so.  Once we have handed over DC
 110       duties to another node, we can then shut down like everyone else,
 111       that is, by asking the DC for permission and waiting for it to take all
 112       our resources away.
 113 
 114       The case where we are the DC and the only node in the cluster is a
 115       special case and handled as an escalation which takes us to
 116       S_SHUTDOWN. Similarly, if any other point in the shutdown
 117       fails or stalls, this is escalated and we end up in S_TERMINATE.
 118 
 119       At any point, the controller can relay messages for its subsystems,
 120       but outbound messages (from subsystems) should probably be blocked
 121       until S_INTEGRATION (for the DC) or the join protocol has
 122       completed (for non-DC controllers).
 123 */
 124 
 125 /*======================================
 126  *
 127  *  Inputs/Events/Stimuli to be given to the finite state machine
 128  *
 129  *  Some of these a true events, and others are synthesised based on
 130  *  the "register" (see below) and the contents or source of messages.
 131  *
 132  *  The machine keeps processing until receiving I_NULL
 133  *
 134  *======================================*/
 135 enum crmd_fsa_input {
 136     I_NULL,                     /* Nothing happened */
 137     I_CIB_UPDATE,               /* An update to the CIB occurred */
 138     I_DC_TIMEOUT,               /* We have lost communication with the DC */
 139     I_ELECTION,                 /* Someone started an election */
 140     I_PE_CALC,                  /* The scheduler needs to be invoked */
 141     I_RELEASE_DC,               /* The election completed and we were not
 142                                  * elected, but we were the DC beforehand
 143                                  */
 144     I_ELECTION_DC,              /* The election completed and we were (re-)elected
 145                                  * DC
 146                                  */
 147     I_ERROR,                    /* Something bad happened (more serious than
 148                                  * I_FAIL) and may not have been due to the action
 149                                  * being performed.  For example, we may have lost
 150                                  * our connection to the CIB.
 151                                  */
 152     I_FAIL,                     /* The action failed to complete successfully */
 153     I_INTEGRATED,
 154     I_FINALIZED,
 155     I_NODE_JOIN,                /* A node has entered the cluster */
 156     I_NOT_DC,                   /* We are not and were not the DC before or after
 157                                  * the current operation or state
 158                                  */
 159     I_RECOVERED,                /* The recovery process completed successfully */
 160     I_RELEASE_FAIL,             /* We could not give up DC status for some reason
 161                                  */
 162     I_RELEASE_SUCCESS,          /* We are no longer the DC */
 163     I_RESTART,                  /* The current set of actions needs to be
 164                                  * restarted
 165                                  */
 166     I_TE_SUCCESS,               /* Some non-resource, non-cluster-layer action
 167                                  * is required of us, e.g. ping
 168                                  */
 169     I_ROUTER,                   /* Do our job as router and forward this to the
 170                                  * right place
 171                                  */
 172     I_SHUTDOWN,                 /* We are asking to shutdown */
 173     I_STOP,                     /* We have been told to shutdown */
 174     I_TERMINATE,                /* Actually exit */
 175     I_STARTUP,
 176     I_PE_SUCCESS,               /* The action completed successfully */
 177     I_JOIN_OFFER,               /* The DC is offering membership */
 178     I_JOIN_REQUEST,             /* The client is requesting membership */
 179     I_JOIN_RESULT,              /* If not the DC: The result of a join request
 180                                  * Else: A client is responding with its local state info
 181                                  */
 182     I_WAIT_FOR_EVENT,           /* we may be waiting for an async task to "happen"
 183                                  * and until it does, we can't do anything else
 184                                  */
 185     I_DC_HEARTBEAT,             /* The DC is telling us that it is alive and well */
 186 
 187     I_PENDING,
 188     I_HALT,
 189 
 190     /*  ------------ Last input found in table is above ----------- */
 191     I_ILLEGAL                   /* This is an illegal value for an FSA input */
 192         /* (must be last) */
 193 };
 194 
 195 #  define MAXINPUT  I_ILLEGAL
 196 
 197 #  define I_MESSAGE I_ROUTER
 198 
 199 /*======================================
 200  *
 201  * actions
 202  *
 203  * Some of the actions below will always occur together for now, but this may
 204  * not always be the case, so they are split up so that they can easily be
 205  * called independently in the future, if necessary.
 206  *
 207  * For example, separating A_LRM_CONNECT from A_STARTUP might be useful
 208  * if we ever try to recover from a faulty or disconnected executor.
 209  *
 210  *======================================*/
 211 
 212          /* Don't do anything */
 213 #  define A_NOTHING                 0x0000000000000000ULL
 214 
 215 /* -- Startup actions -- */
 216         /* Hook to perform any actions (other than connecting to other daemons)
 217          * that might be needed as part of the startup.
 218          */
 219 #  define A_STARTUP                 0x0000000000000001ULL
 220         /* Hook to perform any actions that might be needed as part
 221          * after startup is successful.
 222          */
 223 #  define A_STARTED                 0x0000000000000002ULL
 224         /* Connect to cluster layer */
 225 #  define A_HA_CONNECT              0x0000000000000004ULL
 226 #  define A_HA_DISCONNECT           0x0000000000000008ULL
 227 
 228 #  define A_INTEGRATE_TIMER_START   0x0000000000000010ULL
 229 #  define A_INTEGRATE_TIMER_STOP    0x0000000000000020ULL
 230 #  define A_FINALIZE_TIMER_START    0x0000000000000040ULL
 231 #  define A_FINALIZE_TIMER_STOP     0x0000000000000080ULL
 232 
 233 /* -- Election actions -- */
 234 #  define A_DC_TIMER_START          0x0000000000000100ULL
 235 #  define A_DC_TIMER_STOP           0x0000000000000200ULL
 236 #  define A_ELECTION_COUNT          0x0000000000000400ULL
 237 #  define A_ELECTION_VOTE           0x0000000000000800ULL
 238 
 239 #  define A_ELECTION_START          0x0000000000001000ULL
 240 
 241 /* -- Message processing -- */
 242         /* Process the queue of requests */
 243 #  define A_MSG_PROCESS             0x0000000000002000ULL
 244         /* Send the message to the correct recipient */
 245 #  define A_MSG_ROUTE               0x0000000000004000ULL
 246 
 247         /* Send a welcome message to new node(s) */
 248 #  define A_DC_JOIN_OFFER_ONE       0x0000000000008000ULL
 249 
 250 /* -- Server Join protocol actions -- */
 251         /* Send a welcome message to all nodes */
 252 #  define A_DC_JOIN_OFFER_ALL       0x0000000000010000ULL
 253         /* Process the remote node's ack of our join message */
 254 #  define A_DC_JOIN_PROCESS_REQ     0x0000000000020000ULL
 255         /* Send out the results of the Join phase */
 256 #  define A_DC_JOIN_FINALIZE        0x0000000000040000ULL
 257         /* Send out the results of the Join phase */
 258 #  define A_DC_JOIN_PROCESS_ACK     0x0000000000080000ULL
 259 
 260 /* -- Client Join protocol actions -- */
 261 #  define A_CL_JOIN_QUERY           0x0000000000100000ULL
 262 #  define A_CL_JOIN_ANNOUNCE        0x0000000000200000ULL
 263         /* Request membership to the DC list */
 264 #  define A_CL_JOIN_REQUEST         0x0000000000400000ULL
 265         /* Did the DC accept or reject the request */
 266 #  define A_CL_JOIN_RESULT          0x0000000000800000ULL
 267 
 268 /* -- Recovery, DC start/stop -- */
 269         /* Something bad happened, try to recover */
 270 #  define A_RECOVER                 0x0000000001000000ULL
 271         /* Hook to perform any actions (apart from starting, the TE, scheduler,
 272          * and gathering the latest CIB) that might be necessary before
 273          * giving up the responsibilities of being the DC.
 274          */
 275 #  define A_DC_RELEASE              0x0000000002000000ULL
 276         /* */
 277 #  define A_DC_RELEASED             0x0000000004000000ULL
 278         /* Hook to perform any actions (apart from starting, the TE, scheduler,
 279          * and gathering the latest CIB) that might be necessary before
 280          * taking over the responsibilities of being the DC.
 281          */
 282 #  define A_DC_TAKEOVER             0x0000000008000000ULL
 283 
 284 /* -- Shutdown actions -- */
 285 #  define A_SHUTDOWN                0x0000000010000000ULL
 286 #  define A_STOP                    0x0000000020000000ULL
 287 #  define A_EXIT_0                  0x0000000040000000ULL
 288 #  define A_EXIT_1                  0x0000000080000000ULL
 289 
 290 #  define A_SHUTDOWN_REQ            0x0000000100000000ULL
 291 #  define A_ELECTION_CHECK          0x0000000200000000ULL
 292 #  define A_DC_JOIN_FINAL           0x0000000400000000ULL
 293 
 294 /* -- CIB actions -- */
 295 #  define A_CIB_START               0x0000020000000000ULL
 296 #  define A_CIB_STOP                0x0000040000000000ULL
 297 
 298 /* -- Transition Engine actions -- */
 299         /* Attempt to reach the newly calculated cluster state. This is
 300          * only called once per transition (except if it is asked to
 301          * stop the transition or start a new one).
 302          * Once given a cluster state to reach, the TE will determine
 303          * tasks that can be performed in parallel, execute them, wait
 304          * for replies and then determine the next set until the new
 305          * state is reached or no further tasks can be taken.
 306          */
 307 #  define A_TE_INVOKE               0x0000100000000000ULL
 308 #  define A_TE_START                0x0000200000000000ULL
 309 #  define A_TE_STOP                 0x0000400000000000ULL
 310 #  define A_TE_CANCEL               0x0000800000000000ULL
 311 #  define A_TE_HALT                 0x0001000000000000ULL
 312 
 313 /* -- Scheduler actions -- */
 314         /* Calculate the next state for the cluster.  This is only
 315          * invoked once per needed calculation.
 316          */
 317 #  define A_PE_INVOKE               0x0002000000000000ULL
 318 #  define A_PE_START                0x0004000000000000ULL
 319 #  define A_PE_STOP                 0x0008000000000000ULL
 320 /* -- Misc actions -- */
 321         /* Add a system generate "block" so that resources arent moved
 322          * to or are activly moved away from the affected node.  This
 323          * way we can return quickly even if busy with other things.
 324          */
 325 #  define A_NODE_BLOCK              0x0010000000000000ULL
 326         /* Update our information in the local CIB */
 327 #  define A_UPDATE_NODESTATUS       0x0020000000000000ULL
 328 #  define A_READCONFIG              0x0080000000000000ULL
 329 
 330 /* -- LRM Actions -- */
 331         // Connect to the local executor
 332 #  define A_LRM_CONNECT             0x0100000000000000ULL
 333         // Disconnect from the local executor
 334 #  define A_LRM_DISCONNECT          0x0200000000000000ULL
 335 #  define A_LRM_INVOKE              0x0400000000000000ULL
 336 
 337 /* -- Logging actions -- */
 338 #  define A_LOG                     0x1000000000000000ULL
 339 #  define A_ERROR                   0x2000000000000000ULL
 340 #  define A_WARN                    0x4000000000000000ULL
 341 
 342 #  define O_EXIT                (A_SHUTDOWN|A_STOP|A_LRM_DISCONNECT|A_HA_DISCONNECT|A_EXIT_0|A_CIB_STOP)
 343 #  define O_RELEASE             (A_DC_TIMER_STOP|A_DC_RELEASE|A_PE_STOP|A_TE_STOP|A_DC_RELEASED)
 344 #  define O_PE_RESTART          (A_PE_START|A_PE_STOP)
 345 #  define O_TE_RESTART          (A_TE_START|A_TE_STOP)
 346 #  define O_CIB_RESTART         (A_CIB_START|A_CIB_STOP)
 347 #  define O_LRM_RECONNECT       (A_LRM_CONNECT|A_LRM_DISCONNECT)
 348 #  define O_DC_TIMER_RESTART    (A_DC_TIMER_STOP|A_DC_TIMER_START)
 349 /*======================================
 350  *
 351  * "register" contents
 352  *
 353  * Things we may want to remember regardless of which state we are in.
 354  *
 355  * These also count as inputs for synthesizing I_*
 356  *
 357  *======================================*/
 358 #  define R_THE_DC          0x00000001ULL
 359                                         /* Are we the DC? */
 360 #  define R_STARTING        0x00000002ULL
 361                                         /* Are we starting up? */
 362 #  define R_SHUTDOWN        0x00000004ULL
 363                                         /* Are we trying to shut down? */
 364 #  define R_STAYDOWN        0x00000008ULL
 365                                         /* Should we restart? */
 366 
 367 #  define R_JOIN_OK         0x00000010ULL   /* Have we completed the join process */
 368 #  define R_READ_CONFIG     0x00000040ULL
 369 #  define R_INVOKE_PE       0x00000080ULL   // Should the scheduler be invoked?
 370 
 371 #  define R_CIB_CONNECTED   0x00000100ULL
 372                                         /* Is the CIB connected? */
 373 #  define R_PE_CONNECTED    0x00000200ULL   // Is the scheduler connected?
 374 #  define R_TE_CONNECTED    0x00000400ULL
 375                                         /* Is the Transition Engine connected? */
 376 #  define R_LRM_CONNECTED   0x00000800ULL   // Is the executor connected?
 377 
 378 #  define R_CIB_REQUIRED    0x00001000ULL
 379                                         /* Is the CIB required? */
 380 #  define R_PE_REQUIRED     0x00002000ULL   // Is the scheduler required?
 381 #  define R_TE_REQUIRED     0x00004000ULL
 382                                         /* Is the Transition Engine required? */
 383 #  define R_ST_REQUIRED     0x00008000ULL
 384                                         /* Is the Stonith daemon required? */
 385 
 386 #  define R_CIB_DONE        0x00010000ULL
 387                                         /* Have we calculated the CIB? */
 388 #  define R_HAVE_CIB        0x00020000ULL   /* Do we have an up-to-date CIB */
 389 
 390 #  define R_MEMBERSHIP      0x00100000ULL   /* Have we got cluster layer data yet */
 391 
 392 // Ever received membership-layer data
 393 #  define R_PEER_DATA       0x00200000ULL
 394 
 395 #  define R_HA_DISCONNECTED 0x00400000ULL      /* did we sign out of our own accord */
 396 
 397 #  define R_REQ_PEND        0x01000000ULL
 398                                         /* Are there Requests waiting for
 399                                            processing? */
 400 #  define R_PE_PEND         0x02000000ULL   // Are we awaiting reply from scheduler?
 401 #  define R_TE_PEND         0x04000000ULL
 402                                         /* Has the TE been invoked and we're
 403                                            awaiting completion? */
 404 #  define R_RESP_PEND       0x08000000ULL
 405                                         /* Do we have clients waiting on a
 406                                            response? if so perhaps we shouldn't
 407                                            stop yet */
 408 
 409 #  define R_SENT_RSC_STOP   0x20000000ULL /* Have we sent a stop action to all
 410                                          * resources in preparation for
 411                                          * shutting down */
 412 
 413 #  define R_IN_RECOVERY     0x80000000ULL
 414 
 415 #define CRM_DIRECT_NACK_RC (99) // Deprecated (see PCMK_EXEC_INVALID)
 416 
 417 enum crmd_fsa_cause {
 418     C_UNKNOWN = 0,
 419     C_STARTUP,
 420     C_IPC_MESSAGE,
 421     C_HA_MESSAGE,
 422     C_CRMD_STATUS_CALLBACK,
 423     C_LRM_OP_CALLBACK,
 424     C_TIMER_POPPED,
 425     C_SHUTDOWN,
 426     C_FSA_INTERNAL,
 427 };
 428 
 429 enum fsa_data_type {
 430     fsa_dt_none,
 431     fsa_dt_ha_msg,
 432     fsa_dt_xml,
 433     fsa_dt_lrm,
 434 };
 435 
 436 typedef struct fsa_data_s fsa_data_t;
 437 struct fsa_data_s {
 438     int id;
 439     enum crmd_fsa_input fsa_input;
 440     enum crmd_fsa_cause fsa_cause;
 441     uint64_t actions;
 442     const char *origin;
 443     void *data;
 444     enum fsa_data_type data_type;
 445 };
 446 
 447 #define controld_set_fsa_input_flags(flags_to_set) do {                 \
 448         controld_globals.fsa_input_register                             \
 449             = pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE,         \
 450                                  "FSA input", "controller",             \
 451                                  controld_globals.fsa_input_register,   \
 452                                  (flags_to_set), #flags_to_set);        \
 453     } while (0)
 454 
 455 #define controld_clear_fsa_input_flags(flags_to_clear) do {             \
 456         controld_globals.fsa_input_register                             \
 457             = pcmk__clear_flags_as(__func__, __LINE__, LOG_TRACE,       \
 458                                    "FSA input", "controller",           \
 459                                    controld_globals.fsa_input_register, \
 460                                    (flags_to_clear),                    \
 461                                    #flags_to_clear);                    \
 462     } while (0)
 463 
 464 #define controld_set_fsa_action_flags(flags_to_set) do {            \
 465         controld_globals.fsa_actions                                \
 466             = pcmk__set_flags_as(__func__, __LINE__, LOG_DEBUG,     \
 467                                  "FSA action", "controller",        \
 468                                  controld_globals.fsa_actions,      \
 469                                  (flags_to_set), #flags_to_set);    \
 470     } while (0)
 471 
 472 #define controld_clear_fsa_action_flags(flags_to_clear) do {            \
 473         controld_globals.fsa_actions                                    \
 474             = pcmk__clear_flags_as(__func__, __LINE__, LOG_DEBUG,       \
 475                                    "FSA action", "controller",          \
 476                                    controld_globals.fsa_actions,        \
 477                                    (flags_to_clear), #flags_to_clear);  \
 478     } while (0)
 479 
 480 // This should be moved elsewhere
 481 xmlNode *controld_query_executor_state(void);
 482 
 483 const char *fsa_input2string(enum crmd_fsa_input input);
 484 const char *fsa_state2string(enum crmd_fsa_state state);
 485 const char *fsa_cause2string(enum crmd_fsa_cause cause);
 486 const char *fsa_action2string(long long action);
 487 
 488 enum crmd_fsa_state s_crmd_fsa(enum crmd_fsa_cause cause);
 489 
 490 enum crmd_fsa_state controld_fsa_get_next_state(enum crmd_fsa_input input);
 491 
 492 uint64_t controld_fsa_get_action(enum crmd_fsa_input input);
 493 
 494 void controld_init_fsa_trigger(void);
 495 void controld_destroy_fsa_trigger(void);
 496 
 497 void free_max_generation(void);
 498 
 499 #  define AM_I_DC pcmk_is_set(controld_globals.fsa_input_register, R_THE_DC)
 500 #  define controld_trigger_fsa() controld_trigger_fsa_as(__func__, __LINE__)
 501 
 502 void controld_trigger_fsa_as(const char *fn, int line);
 503 
 504 /* A_READCONFIG */
 505 void do_read_config(long long action, enum crmd_fsa_cause cause,
 506                     enum crmd_fsa_state cur_state,
 507                     enum crmd_fsa_input current_input, fsa_data_t *msg_data);
 508 
 509 /* A_PE_INVOKE */
 510 void do_pe_invoke(long long action, enum crmd_fsa_cause cause,
 511                   enum crmd_fsa_state cur_state,
 512                   enum crmd_fsa_input current_input, fsa_data_t *msg_data);
 513 
 514 /* A_LOG */
 515 void do_log(long long action, enum crmd_fsa_cause cause,
 516             enum crmd_fsa_state cur_state,
 517             enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 518 
 519 /* A_STARTUP */
 520 void do_startup(long long action, enum crmd_fsa_cause cause,
 521                 enum crmd_fsa_state cur_state,
 522                 enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 523 
 524 /* A_CIB_START, STOP, RESTART */
 525 void do_cib_control(long long action, enum crmd_fsa_cause cause,
 526                     enum crmd_fsa_state cur_state,
 527                     enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 528 
 529 /* A_HA_CONNECT */
 530 void do_ha_control(long long action, enum crmd_fsa_cause cause,
 531                    enum crmd_fsa_state cur_state,
 532                    enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 533 
 534 /* A_LRM_CONNECT */
 535 void do_lrm_control(long long action, enum crmd_fsa_cause cause,
 536                     enum crmd_fsa_state cur_state,
 537                     enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 538 
 539 /* A_PE_START, STOP, RESTART */
 540 void do_pe_control(long long action, enum crmd_fsa_cause cause,
 541                    enum crmd_fsa_state cur_state,
 542                    enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 543 
 544 /* A_TE_START, STOP, RESTART */
 545 void do_te_control(long long action, enum crmd_fsa_cause cause,
 546                    enum crmd_fsa_state cur_state,
 547                    enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 548 
 549 /* A_STARTED */
 550 void do_started(long long action, enum crmd_fsa_cause cause,
 551                 enum crmd_fsa_state cur_state,
 552                 enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 553 
 554 /* A_MSG_ROUTE */
 555 void do_msg_route(long long action, enum crmd_fsa_cause cause,
 556                   enum crmd_fsa_state cur_state,
 557                   enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 558 
 559 /* A_RECOVER */
 560 void do_recover(long long action, enum crmd_fsa_cause cause,
 561                 enum crmd_fsa_state cur_state,
 562                 enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 563 
 564 /* A_ELECTION_VOTE */
 565 void do_election_vote(long long action, enum crmd_fsa_cause cause,
 566                       enum crmd_fsa_state cur_state,
 567                       enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 568 
 569 /* A_ELECTION_COUNT */
 570 void do_election_count_vote(long long action, enum crmd_fsa_cause cause,
 571                             enum crmd_fsa_state cur_state,
 572                             enum crmd_fsa_input cur_input,
 573                             fsa_data_t *msg_data);
 574 
 575 /* A_ELECTION_CHECK */
 576 void do_election_check(long long action, enum crmd_fsa_cause cause,
 577                        enum crmd_fsa_state cur_state,
 578                        enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 579 
 580 /* A_DC_TIMER_STOP */
 581 void do_timer_control(long long action, enum crmd_fsa_cause cause,
 582                       enum crmd_fsa_state cur_state,
 583                       enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 584 
 585 /* A_DC_TAKEOVER */
 586 void do_dc_takeover(long long action, enum crmd_fsa_cause cause,
 587                     enum crmd_fsa_state cur_state,
 588                     enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 589 
 590 /* A_DC_RELEASE */
 591 void do_dc_release(long long action, enum crmd_fsa_cause cause,
 592                    enum crmd_fsa_state cur_state,
 593                    enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 594 
 595 /* A_DC_JOIN_OFFER_ALL */
 596 void do_dc_join_offer_all(long long action, enum crmd_fsa_cause cause,
 597                           enum crmd_fsa_state cur_state,
 598                           enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 599 
 600 /* A_DC_JOIN_OFFER_ONE */
 601 void do_dc_join_offer_one(long long action, enum crmd_fsa_cause cause,
 602                           enum crmd_fsa_state cur_state,
 603                           enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 604 
 605 /* A_DC_JOIN_ACK */
 606 void do_dc_join_ack(long long action, enum crmd_fsa_cause cause,
 607                     enum crmd_fsa_state cur_state,
 608                     enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 609 
 610 /* A_DC_JOIN_REQ */
 611 void do_dc_join_filter_offer(long long action, enum crmd_fsa_cause cause,
 612                              enum crmd_fsa_state cur_state,
 613                              enum crmd_fsa_input cur_input,
 614                              fsa_data_t *msg_data);
 615 
 616 /* A_DC_JOIN_FINALIZE */
 617 void do_dc_join_finalize(long long action, enum crmd_fsa_cause cause,
 618                          enum crmd_fsa_state cur_state,
 619                          enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 620 
 621 /* A_CL_JOIN_QUERY */
 622 /* is there a DC out there? */
 623 void do_cl_join_query(long long action, enum crmd_fsa_cause cause,
 624                       enum crmd_fsa_state cur_state,
 625                       enum crmd_fsa_input current_input, fsa_data_t *msg_data);
 626 
 627 /* A_CL_JOIN_ANNOUNCE */
 628 void do_cl_join_announce(long long action, enum crmd_fsa_cause cause,
 629                          enum crmd_fsa_state cur_state,
 630                          enum crmd_fsa_input current_input, fsa_data_t *msg_data);
 631 
 632 /* A_CL_JOIN_REQUEST */
 633 void do_cl_join_offer_respond(long long action, enum crmd_fsa_cause cause,
 634                               enum crmd_fsa_state cur_state,
 635                               enum crmd_fsa_input current_input,
 636                               fsa_data_t *msg_data);
 637 
 638 /* A_CL_JOIN_RESULT */
 639 void do_cl_join_finalize_respond(long long action, enum crmd_fsa_cause cause,
 640                                  enum crmd_fsa_state cur_state,
 641                                  enum crmd_fsa_input current_input,
 642                                  fsa_data_t *msg_data);
 643 
 644 /* A_LRM_INVOKE */
 645 void do_lrm_invoke(long long action, enum crmd_fsa_cause cause,
 646                    enum crmd_fsa_state cur_state,
 647                    enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 648 
 649 /* A_TE_INVOKE, A_TE_CANCEL */
 650 void do_te_invoke(long long action, enum crmd_fsa_cause cause,
 651                   enum crmd_fsa_state cur_state,
 652                   enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 653 
 654 /* A_SHUTDOWN_REQ */
 655 void do_shutdown_req(long long action, enum crmd_fsa_cause cause,
 656                      enum crmd_fsa_state cur_state,
 657                      enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 658 
 659 /* A_SHUTDOWN */
 660 void do_shutdown(long long action, enum crmd_fsa_cause cause,
 661                  enum crmd_fsa_state cur_state,
 662                  enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 663 
 664 /* A_STOP */
 665 void do_stop(long long action, enum crmd_fsa_cause cause,
 666              enum crmd_fsa_state cur_state,
 667              enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 668 
 669 /* A_EXIT_0, A_EXIT_1 */
 670 void do_exit(long long action, enum crmd_fsa_cause cause,
 671              enum crmd_fsa_state cur_state,
 672              enum crmd_fsa_input cur_input, fsa_data_t *msg_data);
 673 
 674 /* A_DC_JOIN_FINAL */
 675 void do_dc_join_final(long long action, enum crmd_fsa_cause cause,
 676                       enum crmd_fsa_state cur_state,
 677                       enum crmd_fsa_input current_input, fsa_data_t *msg_data);
 678 #endif

/* [previous][next][first][last][top][bottom][index][help] */