1 /* 2 * Copyright 2004-2020 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 XML_FSA_MATRIX__H 11 # define XML_FSA_MATRIX__H 12 13 /* 14 * The state transition table. The rows are inputs, and 15 * the columns are states. 16 */ 17 const enum crmd_fsa_state crmd_fsa_state[MAXINPUT][MAXSTATE] = { 18 /* Got an I_NULL */ 19 { 20 /* S_IDLE ==> */ S_IDLE, 21 /* S_ELECTION ==> */ S_ELECTION, 22 /* S_INTEGRATION ==> */ S_INTEGRATION, 23 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 24 /* S_NOT_DC ==> */ S_NOT_DC, 25 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 26 /* S_RECOVERY ==> */ S_RECOVERY, 27 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 28 /* S_STARTING ==> */ S_STARTING, 29 /* S_PENDING ==> */ S_PENDING, 30 /* S_STOPPING ==> */ S_STOPPING, 31 /* S_TERMINATE ==> */ S_TERMINATE, 32 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 33 /* S_HALT ==> */ S_HALT, 34 }, 35 36 /* Got an I_CIB_OP */ 37 { 38 /* S_IDLE ==> */ S_IDLE, 39 /* S_ELECTION ==> */ S_ELECTION, 40 /* S_INTEGRATION ==> */ S_INTEGRATION, 41 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 42 /* S_NOT_DC ==> */ S_NOT_DC, 43 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 44 /* S_RECOVERY ==> */ S_RECOVERY, 45 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 46 /* S_STARTING ==> */ S_STARTING, 47 /* S_PENDING ==> */ S_PENDING, 48 /* S_STOPPING ==> */ S_STOPPING, 49 /* S_TERMINATE ==> */ S_TERMINATE, 50 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 51 /* S_HALT ==> */ S_HALT, 52 }, 53 54 /* Got an I_CIB_UPDATE */ 55 { 56 /* S_IDLE ==> */ S_IDLE, 57 /* S_ELECTION ==> */ S_ELECTION, 58 /* S_INTEGRATION ==> */ S_INTEGRATION, 59 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 60 /* S_NOT_DC ==> */ S_RECOVERY, 61 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 62 /* S_RECOVERY ==> */ S_RECOVERY, 63 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 64 /* S_STARTING ==> */ S_RECOVERY, 65 /* S_PENDING ==> */ S_RECOVERY, 66 /* S_STOPPING ==> */ S_STOPPING, 67 /* S_TERMINATE ==> */ S_TERMINATE, 68 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 69 /* S_HALT ==> */ S_HALT, 70 }, 71 72 /* Got an I_DC_TIMEOUT */ 73 { 74 /* S_IDLE ==> */ S_RECOVERY, 75 /* S_ELECTION ==> */ S_ELECTION, 76 /* S_INTEGRATION ==> */ S_RECOVERY, 77 /* S_FINALIZE_JOIN ==> */ S_RECOVERY, 78 /* S_NOT_DC ==> */ S_ELECTION, 79 /* S_POLICY_ENGINE ==> */ S_RECOVERY, 80 /* S_RECOVERY ==> */ S_RECOVERY, 81 /* S_RELEASE_DC ==> */ S_RECOVERY, 82 /* S_STARTING ==> */ S_STARTING, 83 /* S_PENDING ==> */ S_ELECTION, 84 /* S_STOPPING ==> */ S_STOPPING, 85 /* S_TERMINATE ==> */ S_TERMINATE, 86 /* S_TRANSITION_ENGINE ==> */ S_RECOVERY, 87 /* S_HALT ==> */ S_ELECTION, 88 }, 89 90 /* Got an I_ELECTION */ 91 { 92 /* S_IDLE ==> */ S_ELECTION, 93 /* S_ELECTION ==> */ S_ELECTION, 94 /* S_INTEGRATION ==> */ S_ELECTION, 95 /* S_FINALIZE_JOIN ==> */ S_ELECTION, 96 /* S_NOT_DC ==> */ S_ELECTION, 97 /* S_POLICY_ENGINE ==> */ S_ELECTION, 98 /* S_RECOVERY ==> */ S_RECOVERY, 99 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 100 /* S_STARTING ==> */ S_STARTING, 101 /* S_PENDING ==> */ S_ELECTION, 102 /* S_STOPPING ==> */ S_STOPPING, 103 /* S_TERMINATE ==> */ S_TERMINATE, 104 /* S_TRANSITION_ENGINE ==> */ S_ELECTION, 105 /* S_HALT ==> */ S_HALT, 106 }, 107 108 /* Got an I_PE_CALC */ 109 { 110 /* S_IDLE ==> */ S_POLICY_ENGINE, 111 /* S_ELECTION ==> */ S_ELECTION, 112 /* S_INTEGRATION ==> */ S_INTEGRATION, 113 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 114 /* S_NOT_DC ==> */ S_NOT_DC, 115 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 116 /* S_RECOVERY ==> */ S_RECOVERY, 117 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 118 /* S_STARTING ==> */ S_RECOVERY, 119 /* S_PENDING ==> */ S_PENDING, 120 /* S_STOPPING ==> */ S_STOPPING, 121 /* S_TERMINATE ==> */ S_TERMINATE, 122 /* S_TRANSITION_ENGINE ==> */ S_POLICY_ENGINE, 123 /* S_HALT ==> */ S_HALT, 124 }, 125 126 /* Got an I_RELEASE_DC */ 127 { 128 /* S_IDLE ==> */ S_RELEASE_DC, 129 /* S_ELECTION ==> */ S_RELEASE_DC, 130 /* S_INTEGRATION ==> */ S_RELEASE_DC, 131 /* S_FINALIZE_JOIN ==> */ S_RELEASE_DC, 132 /* S_NOT_DC ==> */ S_NOT_DC, 133 /* S_POLICY_ENGINE ==> */ S_RELEASE_DC, 134 /* S_RECOVERY ==> */ S_RECOVERY, 135 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 136 /* S_STARTING ==> */ S_RECOVERY, 137 /* S_PENDING ==> */ S_PENDING, 138 /* S_STOPPING ==> */ S_STOPPING, 139 /* S_TERMINATE ==> */ S_TERMINATE, 140 /* S_TRANSITION_ENGINE ==> */ S_RELEASE_DC, 141 /* S_HALT ==> */ S_HALT, 142 }, 143 144 /* Got an I_ELECTION_DC */ 145 { 146 /* S_IDLE ==> */ S_INTEGRATION, 147 /* S_ELECTION ==> */ S_INTEGRATION, 148 /* S_INTEGRATION ==> */ S_INTEGRATION, 149 /* S_FINALIZE_JOIN ==> */ S_INTEGRATION, 150 /* S_NOT_DC ==> */ S_INTEGRATION, 151 /* S_POLICY_ENGINE ==> */ S_INTEGRATION, 152 /* S_RECOVERY ==> */ S_RECOVERY, 153 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 154 /* S_STARTING ==> */ S_RECOVERY, 155 /* S_PENDING ==> */ S_PENDING, 156 /* S_STOPPING ==> */ S_STOPPING, 157 /* S_TERMINATE ==> */ S_TERMINATE, 158 /* S_TRANSITION_ENGINE ==> */ S_INTEGRATION, 159 /* S_HALT ==> */ S_HALT, 160 }, 161 162 /* Got an I_ERROR */ 163 { 164 /* S_IDLE ==> */ S_RECOVERY, 165 /* S_ELECTION ==> */ S_RECOVERY, 166 /* S_INTEGRATION ==> */ S_RECOVERY, 167 /* S_FINALIZE_JOIN ==> */ S_RECOVERY, 168 /* S_NOT_DC ==> */ S_RECOVERY, 169 /* S_POLICY_ENGINE ==> */ S_RECOVERY, 170 /* S_RECOVERY ==> */ S_RECOVERY, 171 /* S_RELEASE_DC ==> */ S_RECOVERY, 172 /* S_STARTING ==> */ S_RECOVERY, 173 /* S_PENDING ==> */ S_RECOVERY, 174 /* S_STOPPING ==> */ S_TERMINATE, 175 /* S_TERMINATE ==> */ S_TERMINATE, 176 /* S_TRANSITION_ENGINE ==> */ S_RECOVERY, 177 /* S_HALT ==> */ S_RECOVERY, 178 }, 179 180 /* Got an I_FAIL */ 181 { 182 /* S_IDLE ==> */ S_RECOVERY, 183 /* S_ELECTION ==> */ S_RELEASE_DC, 184 /* S_INTEGRATION ==> */ S_INTEGRATION, 185 /* S_FINALIZE_JOIN ==> */ S_INTEGRATION, 186 /* S_NOT_DC ==> */ S_RECOVERY, 187 /* S_POLICY_ENGINE ==> */ S_INTEGRATION, 188 /* S_RECOVERY ==> */ S_RECOVERY, 189 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 190 /* S_STARTING ==> */ S_STOPPING, 191 /* S_PENDING ==> */ S_STOPPING, 192 /* S_STOPPING ==> */ S_STOPPING, 193 /* S_TERMINATE ==> */ S_TERMINATE, 194 /* S_TRANSITION_ENGINE ==> */ S_POLICY_ENGINE, 195 /* S_HALT ==> */ S_RELEASE_DC, 196 }, 197 198 /* Got an I_INTEGRATED */ 199 { 200 /* S_IDLE ==> */ S_IDLE, 201 /* S_ELECTION ==> */ S_ELECTION, 202 /* S_INTEGRATION ==> */ S_FINALIZE_JOIN, 203 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 204 /* S_NOT_DC ==> */ S_NOT_DC, 205 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 206 /* S_RECOVERY ==> */ S_RECOVERY, 207 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 208 /* S_STARTING ==> */ S_RECOVERY, 209 /* S_PENDING ==> */ S_RECOVERY, 210 /* S_STOPPING ==> */ S_STOPPING, 211 /* S_TERMINATE ==> */ S_TERMINATE, 212 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 213 /* S_HALT ==> */ S_HALT, 214 }, 215 216 /* Got an I_FINALIZED */ 217 { 218 /* S_IDLE ==> */ S_IDLE, 219 /* S_ELECTION ==> */ S_ELECTION, 220 /* S_INTEGRATION ==> */ S_INTEGRATION, 221 /* S_FINALIZE_JOIN ==> */ S_POLICY_ENGINE, 222 /* S_NOT_DC ==> */ S_NOT_DC, 223 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 224 /* S_RECOVERY ==> */ S_RECOVERY, 225 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 226 /* S_STARTING ==> */ S_RECOVERY, 227 /* S_PENDING ==> */ S_RECOVERY, 228 /* S_STOPPING ==> */ S_STOPPING, 229 /* S_TERMINATE ==> */ S_TERMINATE, 230 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 231 /* S_HALT ==> */ S_HALT, 232 }, 233 234 /* Got an I_NODE_JOIN */ 235 { 236 /* S_IDLE ==> */ S_INTEGRATION, 237 /* S_ELECTION ==> */ S_ELECTION, 238 /* S_INTEGRATION ==> */ S_INTEGRATION, 239 /* S_FINALIZE_JOIN ==> */ S_INTEGRATION, 240 /* S_NOT_DC ==> */ S_NOT_DC, 241 /* S_POLICY_ENGINE ==> */ S_INTEGRATION, 242 /* S_RECOVERY ==> */ S_RECOVERY, 243 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 244 /* S_STARTING ==> */ S_RECOVERY, 245 /* S_PENDING ==> */ S_PENDING, 246 /* S_STOPPING ==> */ S_STOPPING, 247 /* S_TERMINATE ==> */ S_TERMINATE, 248 /* S_TRANSITION_ENGINE ==> */ S_INTEGRATION, 249 /* S_HALT ==> */ S_HALT, 250 }, 251 252 /* Got an I_NOT_DC */ 253 { 254 /* S_IDLE ==> */ S_RECOVERY, 255 /* S_ELECTION ==> */ S_ELECTION, 256 /* S_INTEGRATION ==> */ S_RECOVERY, 257 /* S_FINALIZE_JOIN ==> */ S_RECOVERY, 258 /* S_NOT_DC ==> */ S_NOT_DC, 259 /* S_POLICY_ENGINE ==> */ S_RECOVERY, 260 /* S_RECOVERY ==> */ S_RECOVERY, 261 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 262 /* S_STARTING ==> */ S_RECOVERY, 263 /* S_PENDING ==> */ S_NOT_DC, 264 /* S_STOPPING ==> */ S_STOPPING, 265 /* S_TERMINATE ==> */ S_TERMINATE, 266 /* S_TRANSITION_ENGINE ==> */ S_RECOVERY, 267 /* S_HALT ==> */ S_HALT, 268 }, 269 270 /* Got an I_RECOVERED */ 271 { 272 /* S_IDLE ==> */ S_IDLE, 273 /* S_ELECTION ==> */ S_ELECTION, 274 /* S_INTEGRATION ==> */ S_INTEGRATION, 275 /* S_FINALIZE_JOIN ==> */ S_INTEGRATION, 276 /* S_NOT_DC ==> */ S_NOT_DC, 277 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 278 /* S_RECOVERY ==> */ S_PENDING, 279 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 280 /* S_STARTING ==> */ S_STARTING, 281 /* S_PENDING ==> */ S_PENDING, 282 /* S_STOPPING ==> */ S_STOPPING, 283 /* S_TERMINATE ==> */ S_TERMINATE, 284 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 285 /* S_HALT ==> */ S_HALT, 286 }, 287 288 /* Got an I_RELEASE_FAIL */ 289 { 290 /* S_IDLE ==> */ S_STOPPING, 291 /* S_ELECTION ==> */ S_STOPPING, 292 /* S_INTEGRATION ==> */ S_STOPPING, 293 /* S_FINALIZE_JOIN ==> */ S_STOPPING, 294 /* S_NOT_DC ==> */ S_NOT_DC, 295 /* S_POLICY_ENGINE ==> */ S_STOPPING, 296 /* S_RECOVERY ==> */ S_STOPPING, 297 /* S_RELEASE_DC ==> */ S_STOPPING, 298 /* S_STARTING ==> */ S_RECOVERY, 299 /* S_PENDING ==> */ S_PENDING, 300 /* S_STOPPING ==> */ S_STOPPING, 301 /* S_TERMINATE ==> */ S_TERMINATE, 302 /* S_TRANSITION_ENGINE ==> */ S_STOPPING, 303 /* S_HALT ==> */ S_HALT, 304 }, 305 306 /* Got an I_RELEASE_SUCCESS */ 307 { 308 /* S_IDLE ==> */ S_RECOVERY, 309 /* S_ELECTION ==> */ S_ELECTION, 310 /* S_INTEGRATION ==> */ S_RECOVERY, 311 /* S_FINALIZE_JOIN ==> */ S_RECOVERY, 312 /* S_NOT_DC ==> */ S_NOT_DC, 313 /* S_POLICY_ENGINE ==> */ S_RECOVERY, 314 /* S_RECOVERY ==> */ S_RECOVERY, 315 /* S_RELEASE_DC ==> */ S_PENDING, 316 /* S_STARTING ==> */ S_RECOVERY, 317 /* S_PENDING ==> */ S_PENDING, 318 /* S_STOPPING ==> */ S_STOPPING, 319 /* S_TERMINATE ==> */ S_TERMINATE, 320 /* S_TRANSITION_ENGINE ==> */ S_RECOVERY, 321 /* S_HALT ==> */ S_HALT, 322 }, 323 324 /* Got an I_RESTART */ 325 { 326 /* S_IDLE ==> */ S_IDLE, 327 /* S_ELECTION ==> */ S_ELECTION, 328 /* S_INTEGRATION ==> */ S_INTEGRATION, 329 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 330 /* S_NOT_DC ==> */ S_NOT_DC, 331 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 332 /* S_RECOVERY ==> */ S_RECOVERY, 333 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 334 /* S_STARTING ==> */ S_STARTING, 335 /* S_PENDING ==> */ S_PENDING, 336 /* S_STOPPING ==> */ S_STOPPING, 337 /* S_TERMINATE ==> */ S_TERMINATE, 338 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 339 /* S_HALT ==> */ S_HALT, 340 }, 341 342 /* Got an I_TE_SUCCESS */ 343 { 344 /* S_IDLE ==> */ S_IDLE, 345 /* S_ELECTION ==> */ S_ELECTION, 346 /* S_INTEGRATION ==> */ S_INTEGRATION, 347 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 348 /* S_NOT_DC ==> */ S_NOT_DC, 349 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 350 /* S_RECOVERY ==> */ S_RECOVERY, 351 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 352 /* S_STARTING ==> */ S_RECOVERY, 353 /* S_PENDING ==> */ S_PENDING, 354 /* S_STOPPING ==> */ S_STOPPING, 355 /* S_TERMINATE ==> */ S_TERMINATE, 356 /* S_TRANSITION_ENGINE ==> */ S_IDLE, 357 /* S_HALT ==> */ S_HALT, 358 }, 359 360 /* Got an I_ROUTER */ 361 { 362 /* S_IDLE ==> */ S_IDLE, 363 /* S_ELECTION ==> */ S_ELECTION, 364 /* S_INTEGRATION ==> */ S_INTEGRATION, 365 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 366 /* S_NOT_DC ==> */ S_NOT_DC, 367 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 368 /* S_RECOVERY ==> */ S_RECOVERY, 369 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 370 /* S_STARTING ==> */ S_STARTING, 371 /* S_PENDING ==> */ S_PENDING, 372 /* S_STOPPING ==> */ S_STOPPING, 373 /* S_TERMINATE ==> */ S_TERMINATE, 374 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 375 /* S_HALT ==> */ S_HALT, 376 }, 377 378 /* Got an I_SHUTDOWN */ 379 { 380 /* S_IDLE ==> */ S_POLICY_ENGINE, 381 /* S_ELECTION ==> */ S_ELECTION, 382 /* S_INTEGRATION ==> */ S_INTEGRATION, 383 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 384 /* S_NOT_DC ==> */ S_NOT_DC, 385 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 386 /* S_RECOVERY ==> */ S_STOPPING, 387 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 388 /* S_STARTING ==> */ S_STOPPING, 389 /* S_PENDING ==> */ S_PENDING, 390 /* S_STOPPING ==> */ S_STOPPING, 391 /* S_TERMINATE ==> */ S_TERMINATE, 392 /* S_TRANSITION_ENGINE ==> */ S_POLICY_ENGINE, 393 /* S_HALT ==> */ S_ELECTION, 394 }, 395 396 /* Got an I_STOP */ 397 { 398 /* S_IDLE ==> */ S_STOPPING, 399 /* S_ELECTION ==> */ S_STOPPING, 400 /* S_INTEGRATION ==> */ S_STOPPING, 401 /* S_FINALIZE_JOIN ==> */ S_STOPPING, 402 /* S_NOT_DC ==> */ S_STOPPING, 403 /* S_POLICY_ENGINE ==> */ S_STOPPING, 404 /* S_RECOVERY ==> */ S_STOPPING, 405 /* S_RELEASE_DC ==> */ S_STOPPING, 406 /* S_STARTING ==> */ S_STOPPING, 407 /* S_PENDING ==> */ S_STOPPING, 408 /* S_STOPPING ==> */ S_STOPPING, 409 /* S_TERMINATE ==> */ S_TERMINATE, 410 /* S_TRANSITION_ENGINE ==> */ S_STOPPING, 411 /* S_HALT ==> */ S_STOPPING, 412 }, 413 414 /* Got an I_TERMINATE */ 415 { 416 /* S_IDLE ==> */ S_TERMINATE, 417 /* S_ELECTION ==> */ S_TERMINATE, 418 /* S_INTEGRATION ==> */ S_TERMINATE, 419 /* S_FINALIZE_JOIN ==> */ S_TERMINATE, 420 /* S_NOT_DC ==> */ S_TERMINATE, 421 /* S_POLICY_ENGINE ==> */ S_TERMINATE, 422 /* S_RECOVERY ==> */ S_TERMINATE, 423 /* S_RELEASE_DC ==> */ S_TERMINATE, 424 /* S_STARTING ==> */ S_TERMINATE, 425 /* S_PENDING ==> */ S_TERMINATE, 426 /* S_STOPPING ==> */ S_TERMINATE, 427 /* S_TERMINATE ==> */ S_TERMINATE, 428 /* S_TRANSITION_ENGINE ==> */ S_TERMINATE, 429 /* S_HALT ==> */ S_TERMINATE, 430 }, 431 432 /* Got an I_STARTUP */ 433 { 434 /* S_IDLE ==> */ S_RECOVERY, 435 /* S_ELECTION ==> */ S_RECOVERY, 436 /* S_INTEGRATION ==> */ S_RECOVERY, 437 /* S_FINALIZE_JOIN ==> */ S_RECOVERY, 438 /* S_NOT_DC ==> */ S_RECOVERY, 439 /* S_POLICY_ENGINE ==> */ S_RECOVERY, 440 /* S_RECOVERY ==> */ S_RECOVERY, 441 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 442 /* S_STARTING ==> */ S_STARTING, 443 /* S_PENDING ==> */ S_PENDING, 444 /* S_STOPPING ==> */ S_STOPPING, 445 /* S_TERMINATE ==> */ S_TERMINATE, 446 /* S_TRANSITION_ENGINE ==> */ S_RECOVERY, 447 /* S_HALT ==> */ S_HALT, 448 }, 449 450 /* Got an I_PE_SUCCESS */ 451 { 452 /* S_IDLE ==> */ S_IDLE, 453 /* S_ELECTION ==> */ S_ELECTION, 454 /* S_INTEGRATION ==> */ S_INTEGRATION, 455 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 456 /* S_NOT_DC ==> */ S_NOT_DC, 457 /* S_POLICY_ENGINE ==> */ S_TRANSITION_ENGINE, 458 /* S_RECOVERY ==> */ S_RECOVERY, 459 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 460 /* S_STARTING ==> */ S_RECOVERY, 461 /* S_PENDING ==> */ S_PENDING, 462 /* S_STOPPING ==> */ S_STOPPING, 463 /* S_TERMINATE ==> */ S_TERMINATE, 464 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 465 /* S_HALT ==> */ S_HALT, 466 }, 467 468 /* Got an I_JOIN_OFFER */ 469 { 470 /* S_IDLE ==> */ S_IDLE, 471 /* S_ELECTION ==> */ S_ELECTION, 472 /* S_INTEGRATION ==> */ S_INTEGRATION, 473 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 474 /* S_NOT_DC ==> */ S_PENDING, 475 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 476 /* S_RECOVERY ==> */ S_RECOVERY, 477 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 478 /* S_STARTING ==> */ S_STARTING, 479 /* S_PENDING ==> */ S_PENDING, 480 /* S_STOPPING ==> */ S_STOPPING, 481 /* S_TERMINATE ==> */ S_TERMINATE, 482 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 483 /* S_HALT ==> */ S_HALT, 484 }, 485 486 /* Got an I_JOIN_REQUEST */ 487 { 488 /* S_IDLE ==> */ S_INTEGRATION, 489 /* S_ELECTION ==> */ S_ELECTION, 490 /* S_INTEGRATION ==> */ S_INTEGRATION, 491 /* S_FINALIZE_JOIN ==> */ S_INTEGRATION, 492 /* S_NOT_DC ==> */ S_NOT_DC, 493 /* S_POLICY_ENGINE ==> */ S_INTEGRATION, 494 /* S_RECOVERY ==> */ S_RECOVERY, 495 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 496 /* S_STARTING ==> */ S_STARTING, 497 /* S_PENDING ==> */ S_PENDING, 498 /* S_STOPPING ==> */ S_STOPPING, 499 /* S_TERMINATE ==> */ S_TERMINATE, 500 /* S_TRANSITION_ENGINE ==> */ S_INTEGRATION, 501 /* S_HALT ==> */ S_HALT, 502 }, 503 504 /* Got an I_JOIN_RESULT */ 505 { 506 /* S_IDLE ==> */ S_INTEGRATION, 507 /* S_ELECTION ==> */ S_ELECTION, 508 /* S_INTEGRATION ==> */ S_INTEGRATION, 509 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 510 /* S_NOT_DC ==> */ S_PENDING, 511 /* S_POLICY_ENGINE ==> */ S_INTEGRATION, 512 /* S_RECOVERY ==> */ S_RECOVERY, 513 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 514 /* S_STARTING ==> */ S_RECOVERY, 515 /* S_PENDING ==> */ S_PENDING, 516 /* S_STOPPING ==> */ S_STOPPING, 517 /* S_TERMINATE ==> */ S_TERMINATE, 518 /* S_TRANSITION_ENGINE ==> */ S_INTEGRATION, 519 /* S_HALT ==> */ S_HALT, 520 }, 521 522 /* Got an I_WAIT_FOR_EVENT */ 523 { 524 /* S_IDLE ==> */ S_IDLE, 525 /* S_ELECTION ==> */ S_ELECTION, 526 /* S_INTEGRATION ==> */ S_INTEGRATION, 527 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 528 /* S_NOT_DC ==> */ S_NOT_DC, 529 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 530 /* S_RECOVERY ==> */ S_RECOVERY, 531 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 532 /* S_STARTING ==> */ S_STARTING, 533 /* S_PENDING ==> */ S_PENDING, 534 /* S_STOPPING ==> */ S_STOPPING, 535 /* S_TERMINATE ==> */ S_TERMINATE, 536 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 537 /* S_HALT ==> */ S_HALT, 538 }, 539 540 /* Got an I_DC_HEARTBEAT */ 541 { 542 /* S_IDLE ==> */ S_IDLE, 543 /* S_ELECTION ==> */ S_ELECTION, 544 /* S_INTEGRATION ==> */ S_INTEGRATION, 545 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 546 /* S_NOT_DC ==> */ S_NOT_DC, 547 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 548 /* S_RECOVERY ==> */ S_RECOVERY, 549 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 550 /* S_STARTING ==> */ S_STARTING, 551 /* S_PENDING ==> */ S_PENDING, 552 /* S_STOPPING ==> */ S_STOPPING, 553 /* S_TERMINATE ==> */ S_TERMINATE, 554 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 555 /* S_HALT ==> */ S_HALT, 556 }, 557 558 /* Got an I_LRM_EVENT */ 559 { 560 /* S_IDLE ==> */ S_IDLE, 561 /* S_ELECTION ==> */ S_ELECTION, 562 /* S_INTEGRATION ==> */ S_INTEGRATION, 563 /* S_FINALIZE_JOIN ==> */ S_FINALIZE_JOIN, 564 /* S_NOT_DC ==> */ S_NOT_DC, 565 /* S_POLICY_ENGINE ==> */ S_POLICY_ENGINE, 566 /* S_RECOVERY ==> */ S_RECOVERY, 567 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 568 /* S_STARTING ==> */ S_STARTING, 569 /* S_PENDING ==> */ S_PENDING, 570 /* S_STOPPING ==> */ S_STOPPING, 571 /* S_TERMINATE ==> */ S_TERMINATE, 572 /* S_TRANSITION_ENGINE ==> */ S_TRANSITION_ENGINE, 573 /* S_HALT ==> */ S_HALT, 574 }, 575 576 /* Got an I_PENDING */ 577 { 578 /* S_IDLE ==> */ S_PENDING, 579 /* S_ELECTION ==> */ S_PENDING, 580 /* S_INTEGRATION ==> */ S_PENDING, 581 /* S_FINALIZE_JOIN ==> */ S_PENDING, 582 /* S_NOT_DC ==> */ S_PENDING, 583 /* S_POLICY_ENGINE ==> */ S_PENDING, 584 /* S_RECOVERY ==> */ S_RECOVERY, 585 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 586 /* S_STARTING ==> */ S_PENDING, 587 /* S_PENDING ==> */ S_PENDING, 588 /* S_STOPPING ==> */ S_STOPPING, 589 /* S_TERMINATE ==> */ S_TERMINATE, 590 /* S_TRANSITION_ENGINE ==> */ S_PENDING, 591 /* S_HALT ==> */ S_HALT, 592 }, 593 594 /* Got an I_HALT */ 595 { 596 /* S_IDLE ==> */ S_HALT, 597 /* S_ELECTION ==> */ S_HALT, 598 /* S_INTEGRATION ==> */ S_HALT, 599 /* S_FINALIZE_JOIN ==> */ S_HALT, 600 /* S_NOT_DC ==> */ S_HALT, 601 /* S_POLICY_ENGINE ==> */ S_HALT, 602 /* S_RECOVERY ==> */ S_RECOVERY, 603 /* S_RELEASE_DC ==> */ S_RELEASE_DC, 604 /* S_STARTING ==> */ S_STARTING, 605 /* S_PENDING ==> */ S_HALT, 606 /* S_STOPPING ==> */ S_STOPPING, 607 /* S_TERMINATE ==> */ S_TERMINATE, 608 /* S_TRANSITION_ENGINE ==> */ S_HALT, 609 /* S_HALT ==> */ S_HALT, 610 }, 611 }; 612 613 /* 614 * The action table. Each entry is a set of actions to take or-ed 615 * together. Like the state table, the rows are inputs, and 616 * the columns are states. 617 */ 618 619 /* NOTE: In the fsa, the actions are extracted then state is updated. */ 620 621 const uint64_t crmd_fsa_actions[MAXINPUT][MAXSTATE] = { 622 623 /* Got an I_NULL */ 624 { 625 /* S_IDLE ==> */ A_NOTHING, 626 /* S_ELECTION ==> */ A_NOTHING, 627 /* S_INTEGRATION ==> */ A_NOTHING, 628 /* S_FINALIZE_JOIN ==> */ A_NOTHING, 629 /* S_NOT_DC ==> */ A_NOTHING, 630 /* S_POLICY_ENGINE ==> */ A_NOTHING, 631 /* S_RECOVERY ==> */ A_NOTHING, 632 /* S_RELEASE_DC ==> */ A_NOTHING, 633 /* S_STARTING ==> */ A_NOTHING, 634 /* S_PENDING ==> */ A_NOTHING, 635 /* S_STOPPING ==> */ A_NOTHING, 636 /* S_TERMINATE ==> */ A_NOTHING, 637 /* S_TRANSITION_ENGINE ==> */ A_NOTHING, 638 /* S_HALT ==> */ A_NOTHING, 639 }, 640 641 /* Got an I_CIB_OP */ 642 { 643 /* S_IDLE ==> */ A_ERROR, 644 /* S_ELECTION ==> */ A_ERROR, 645 /* S_INTEGRATION ==> */ A_ERROR, 646 /* S_FINALIZE_JOIN ==> */ A_ERROR, 647 /* S_NOT_DC ==> */ A_ERROR, 648 /* S_POLICY_ENGINE ==> */ A_ERROR, 649 /* S_RECOVERY ==> */ A_ERROR, 650 /* S_RELEASE_DC ==> */ A_ERROR, 651 /* S_STARTING ==> */ A_ERROR, 652 /* S_PENDING ==> */ A_ERROR, 653 /* S_STOPPING ==> */ A_ERROR, 654 /* S_TERMINATE ==> */ A_ERROR, 655 /* S_TRANSITION_ENGINE ==> */ A_ERROR, 656 /* S_HALT ==> */ A_ERROR, 657 }, 658 659 /* Got an I_CIB_UPDATE */ 660 { 661 /* S_IDLE ==> */ A_LOG, 662 /* S_ELECTION ==> */ A_LOG, 663 /* S_INTEGRATION ==> */ A_WARN, 664 /* S_FINALIZE_JOIN ==> */ A_WARN, 665 /* S_NOT_DC ==> */ A_WARN, 666 /* S_POLICY_ENGINE ==> */ A_LOG, 667 /* S_RECOVERY ==> */ A_WARN, 668 /* S_RELEASE_DC ==> */ A_WARN, 669 /* S_STARTING ==> */ A_WARN, 670 /* S_PENDING ==> */ A_WARN, 671 /* S_STOPPING ==> */ A_WARN, 672 /* S_TERMINATE ==> */ A_WARN, 673 /* S_TRANSITION_ENGINE ==> */ A_LOG, 674 /* S_HALT ==> */ A_WARN, 675 }, 676 677 /* Got an I_DC_TIMEOUT */ 678 { 679 /* S_IDLE ==> */ A_WARN, 680 /* S_ELECTION ==> */ A_ELECTION_VOTE, 681 /* S_INTEGRATION ==> */ A_WARN, 682 /* S_FINALIZE_JOIN ==> */ A_WARN, 683 /* S_NOT_DC ==> */ A_ELECTION_VOTE | A_WARN, 684 /* S_POLICY_ENGINE ==> */ A_WARN, 685 /* S_RECOVERY ==> */ A_NOTHING, 686 /* S_RELEASE_DC ==> */ A_WARN, 687 /* S_STARTING ==> */ A_WARN, 688 /* S_PENDING ==> */ A_ELECTION_VOTE | A_WARN, 689 /* S_STOPPING ==> */ A_NOTHING, 690 /* S_TERMINATE ==> */ A_NOTHING, 691 /* S_TRANSITION_ENGINE ==> */ A_TE_CANCEL | A_WARN, 692 /* S_HALT ==> */ A_WARN, 693 }, 694 695 /* Got an I_ELECTION */ 696 { 697 /* S_IDLE ==> */ A_ELECTION_VOTE, 698 /* S_ELECTION ==> */ A_ELECTION_VOTE, 699 /* S_INTEGRATION ==> */ A_ELECTION_VOTE, 700 /* S_FINALIZE_JOIN ==> */ A_ELECTION_VOTE, 701 /* S_NOT_DC ==> */ A_ELECTION_VOTE, 702 /* S_POLICY_ENGINE ==> */ A_ELECTION_VOTE, 703 /* S_RECOVERY ==> */ A_LOG, 704 /* S_RELEASE_DC ==> */ A_LOG, 705 /* S_STARTING ==> */ A_WARN, 706 /* S_PENDING ==> */ A_ELECTION_VOTE, 707 /* S_STOPPING ==> */ A_LOG, 708 /* S_TERMINATE ==> */ A_LOG, 709 /* S_TRANSITION_ENGINE ==> */ A_ELECTION_VOTE, 710 /* S_HALT ==> */ A_ELECTION_VOTE, 711 }, 712 713 /* Got an I_PE_CALC */ 714 { 715 /* S_IDLE ==> */ A_PE_INVOKE, 716 /* S_ELECTION ==> */ A_NOTHING, 717 /* S_INTEGRATION ==> */ A_NOTHING, 718 /* S_FINALIZE_JOIN ==> */ A_NOTHING, 719 /* S_NOT_DC ==> */ A_WARN, 720 /* S_POLICY_ENGINE ==> */ A_PE_INVOKE, 721 /* S_RECOVERY ==> */ A_NOTHING, 722 /* S_RELEASE_DC ==> */ A_NOTHING, 723 /* S_STARTING ==> */ A_ERROR, 724 /* S_PENDING ==> */ A_WARN, 725 /* S_STOPPING ==> */ A_WARN, 726 /* S_TERMINATE ==> */ A_ERROR, 727 /* S_TRANSITION_ENGINE ==> */ A_PE_INVOKE, 728 /* S_HALT ==> */ A_ERROR, 729 }, 730 731 /* Got an I_RELEASE_DC */ 732 { 733 /* S_IDLE ==> */ O_RELEASE, 734 /* S_ELECTION ==> */ O_RELEASE, 735 /* S_INTEGRATION ==> */ O_RELEASE | A_WARN, 736 /* S_FINALIZE_JOIN ==> */ O_RELEASE | A_WARN, 737 /* S_NOT_DC ==> */ A_WARN, 738 /* S_POLICY_ENGINE ==> */ O_RELEASE | A_WARN, 739 /* S_RECOVERY ==> */ O_RELEASE, 740 /* S_RELEASE_DC ==> */ O_RELEASE | A_WARN, 741 /* S_STARTING ==> */ A_ERROR, 742 /* S_PENDING ==> */ A_WARN, 743 /* S_STOPPING ==> */ A_WARN, 744 /* S_TERMINATE ==> */ A_WARN, 745 /* S_TRANSITION_ENGINE ==> */ O_RELEASE | A_WARN, 746 /* S_HALT ==> */ A_WARN, 747 }, 748 749 /* Got an I_ELECTION_DC */ 750 { 751 /* S_IDLE ==> */ A_WARN | A_ELECTION_VOTE, 752 /* S_ELECTION ==> */ 753 A_LOG | A_DC_TAKEOVER | A_PE_START | A_TE_START | A_DC_JOIN_OFFER_ALL | A_DC_TIMER_STOP, 754 /* S_INTEGRATION ==> */ A_WARN | A_ELECTION_VOTE | A_DC_JOIN_OFFER_ALL, 755 /* S_FINALIZE_JOIN ==> */ A_WARN | A_ELECTION_VOTE | A_DC_JOIN_OFFER_ALL, 756 /* S_NOT_DC ==> */ A_LOG | A_ELECTION_VOTE, 757 /* S_POLICY_ENGINE ==> */ A_WARN | A_ELECTION_VOTE, 758 /* S_RECOVERY ==> */ A_WARN, 759 /* S_RELEASE_DC ==> */ A_WARN | A_ELECTION_VOTE, 760 /* S_STARTING ==> */ A_LOG | A_WARN, 761 /* S_PENDING ==> */ A_LOG | A_WARN, 762 /* S_STOPPING ==> */ A_WARN, 763 /* S_TERMINATE ==> */ A_WARN, 764 /* S_TRANSITION_ENGINE ==> */ A_WARN | A_ELECTION_VOTE, 765 /* S_HALT ==> */ A_WARN, 766 }, 767 768 /* Got an I_ERROR */ 769 { 770 /* S_IDLE ==> */ A_ERROR | A_RECOVER | O_RELEASE | A_ELECTION_START, 771 /* S_ELECTION ==> */ A_ERROR | A_RECOVER | O_RELEASE, 772 /* S_INTEGRATION ==> */ A_ERROR | A_RECOVER | O_RELEASE | A_ELECTION_START, 773 /* S_FINALIZE_JOIN ==> */ A_ERROR | A_RECOVER | O_RELEASE | A_ELECTION_START, 774 /* S_NOT_DC ==> */ A_ERROR | A_RECOVER, 775 /* S_POLICY_ENGINE ==> */ A_ERROR | A_RECOVER | O_RELEASE | A_ELECTION_START, 776 /* S_RECOVERY ==> */ A_ERROR | O_RELEASE, 777 /* S_RELEASE_DC ==> */ A_ERROR | A_RECOVER, 778 /* S_STARTING ==> */ A_ERROR | A_RECOVER, 779 /* S_PENDING ==> */ A_ERROR | A_RECOVER, 780 /* S_STOPPING ==> */ A_ERROR | A_EXIT_1, 781 /* S_TERMINATE ==> */ A_ERROR | A_EXIT_1, 782 /* S_TRANSITION_ENGINE ==> */ A_ERROR | A_RECOVER | O_RELEASE | A_ELECTION_START, 783 /* S_HALT ==> */ A_ERROR | A_RECOVER | O_RELEASE | A_ELECTION_START, 784 }, 785 786 /* Got an I_FAIL */ 787 { 788 /* S_IDLE ==> */ A_WARN, 789 /* S_ELECTION ==> */ A_WARN, 790 /* S_INTEGRATION ==> */ A_WARN | A_DC_JOIN_OFFER_ALL, 791 /* S_FINALIZE_JOIN ==> */ A_WARN | A_DC_JOIN_OFFER_ALL, 792 /* S_NOT_DC ==> */ A_WARN, 793 /* S_POLICY_ENGINE ==> */ A_WARN | A_DC_JOIN_OFFER_ALL | A_TE_CANCEL, 794 /* S_RECOVERY ==> */ A_WARN | O_RELEASE, 795 /* S_RELEASE_DC ==> */ A_WARN, 796 /* S_STARTING ==> */ A_WARN, 797 /* S_PENDING ==> */ A_WARN, 798 /* S_STOPPING ==> */ A_WARN, 799 /* S_TERMINATE ==> */ A_WARN | A_EXIT_1, 800 /* S_TRANSITION_ENGINE ==> */ A_WARN | O_LRM_RECONNECT | A_PE_INVOKE | A_TE_CANCEL, 801 /* S_HALT ==> */ A_WARN, 802 }, 803 804 /* Got an I_INTEGRATED */ 805 { 806 /* S_IDLE ==> */ A_NOTHING, 807 /* S_ELECTION ==> */ A_WARN, 808 /* S_INTEGRATION ==> */ A_DC_JOIN_FINALIZE, 809 /* S_FINALIZE_JOIN ==> */ A_WARN, 810 /* S_NOT_DC ==> */ A_WARN, 811 /* S_POLICY_ENGINE ==> */ A_NOTHING, 812 /* S_RECOVERY ==> */ A_WARN, 813 /* S_RELEASE_DC ==> */ A_WARN, 814 /* S_STARTING ==> */ A_WARN, 815 /* S_PENDING ==> */ A_WARN, 816 /* S_STOPPING ==> */ A_WARN, 817 /* S_TERMINATE ==> */ A_WARN, 818 /* S_TRANSITION_ENGINE ==> */ A_NOTHING, 819 /* S_HALT ==> */ A_WARN, 820 }, 821 822 /* Got an I_FINALIZED */ 823 { 824 /* S_IDLE ==> */ A_NOTHING, 825 /* S_ELECTION ==> */ A_WARN, 826 /* S_INTEGRATION ==> */ A_WARN, 827 /* S_FINALIZE_JOIN ==> */ A_DC_JOIN_FINAL | A_TE_CANCEL, 828 /* S_NOT_DC ==> */ A_WARN, 829 /* S_POLICY_ENGINE ==> */ A_NOTHING, 830 /* S_RECOVERY ==> */ A_WARN, 831 /* S_RELEASE_DC ==> */ A_WARN, 832 /* S_STARTING ==> */ A_WARN, 833 /* S_PENDING ==> */ A_WARN, 834 /* S_STOPPING ==> */ A_WARN, 835 /* S_TERMINATE ==> */ A_WARN, 836 /* S_TRANSITION_ENGINE ==> */ A_NOTHING, 837 /* S_HALT ==> */ A_WARN, 838 }, 839 840 /* Got an I_NODE_JOIN */ 841 { 842 /* S_IDLE ==> */ A_TE_HALT | A_DC_JOIN_OFFER_ONE, 843 /* S_ELECTION ==> */ A_WARN, 844 /* S_INTEGRATION ==> */ A_DC_JOIN_OFFER_ONE, 845 /* S_FINALIZE_JOIN ==> */ A_DC_JOIN_OFFER_ONE, 846 /* S_NOT_DC ==> */ A_WARN, 847 /* S_POLICY_ENGINE ==> */ A_DC_JOIN_OFFER_ONE, 848 /* S_RECOVERY ==> */ A_WARN, 849 /* S_RELEASE_DC ==> */ A_WARN, 850 /* S_STARTING ==> */ A_WARN, 851 /* S_PENDING ==> */ A_WARN, 852 /* S_STOPPING ==> */ A_WARN, 853 /* S_TERMINATE ==> */ A_WARN, 854 /* S_TRANSITION_ENGINE ==> */ A_TE_HALT | A_DC_JOIN_OFFER_ONE, 855 /* S_HALT ==> */ A_WARN, 856 }, 857 858 /* Got an I_NOT_DC */ 859 { 860 /* S_IDLE ==> */ A_WARN | O_RELEASE, 861 /* S_ELECTION ==> */ A_ERROR | A_ELECTION_START | A_DC_TIMER_STOP, 862 /* S_INTEGRATION ==> */ A_ERROR | O_RELEASE, 863 /* S_FINALIZE_JOIN ==> */ A_ERROR | O_RELEASE, 864 /* S_NOT_DC ==> */ A_LOG, 865 /* S_POLICY_ENGINE ==> */ A_ERROR | O_RELEASE, 866 /* S_RECOVERY ==> */ A_ERROR | O_RELEASE, 867 /* S_RELEASE_DC ==> */ A_ERROR | O_RELEASE, 868 /* S_STARTING ==> */ A_WARN, 869 /* S_PENDING ==> */ A_LOG | A_DC_TIMER_STOP, 870 /* S_STOPPING ==> */ A_WARN, 871 /* S_TERMINATE ==> */ A_WARN, 872 /* S_TRANSITION_ENGINE ==> */ A_ERROR | O_RELEASE, 873 /* S_HALT ==> */ A_WARN, 874 }, 875 876 /* Got an I_RECOVERED */ 877 { 878 /* S_IDLE ==> */ A_WARN, 879 /* S_ELECTION ==> */ A_ELECTION_VOTE, 880 /* S_INTEGRATION ==> */ A_WARN, 881 /* S_FINALIZE_JOIN ==> */ A_WARN, 882 /* S_NOT_DC ==> */ A_WARN, 883 /* S_POLICY_ENGINE ==> */ A_WARN, 884 /* S_RECOVERY ==> */ A_LOG, 885 /* S_RELEASE_DC ==> */ A_WARN, 886 /* S_STARTING ==> */ A_WARN, 887 /* S_PENDING ==> */ A_WARN, 888 /* S_STOPPING ==> */ A_WARN, 889 /* S_TERMINATE ==> */ A_WARN, 890 /* S_TRANSITION_ENGINE ==> */ A_WARN, 891 /* S_HALT ==> */ A_WARN, 892 }, 893 894 /* Got an I_RELEASE_FAIL */ 895 { 896 /* S_IDLE ==> */ A_WARN, 897 /* S_ELECTION ==> */ A_WARN, 898 /* S_INTEGRATION ==> */ A_WARN, 899 /* S_FINALIZE_JOIN ==> */ A_WARN, 900 /* S_NOT_DC ==> */ A_WARN, 901 /* S_POLICY_ENGINE ==> */ A_NOTHING, 902 /* S_RECOVERY ==> */ A_WARN | A_SHUTDOWN_REQ, 903 /* S_RELEASE_DC ==> */ A_NOTHING, 904 /* S_STARTING ==> */ A_WARN, 905 /* S_PENDING ==> */ A_WARN, 906 /* S_STOPPING ==> */ A_WARN, 907 /* S_TERMINATE ==> */ A_WARN, 908 /* S_TRANSITION_ENGINE ==> */ A_WARN, 909 /* S_HALT ==> */ A_WARN, 910 }, 911 912 /* Got an I_RELEASE_SUCCESS */ 913 { 914 /* S_IDLE ==> */ A_WARN, 915 /* S_ELECTION ==> */ A_WARN, 916 /* S_INTEGRATION ==> */ A_WARN, 917 /* S_FINALIZE_JOIN ==> */ A_WARN, 918 /* S_NOT_DC ==> */ A_WARN, 919 /* S_POLICY_ENGINE ==> */ A_WARN, 920 /* S_RECOVERY ==> */ A_WARN, 921 /* S_RELEASE_DC ==> */ A_LOG, 922 /* S_STARTING ==> */ A_WARN, 923 /* S_PENDING ==> */ A_LOG, 924 /* S_STOPPING ==> */ A_WARN, 925 /* S_TERMINATE ==> */ A_WARN, 926 /* S_TRANSITION_ENGINE ==> */ A_WARN, 927 /* S_HALT ==> */ A_WARN, 928 }, 929 930 /* Got an I_RESTART */ 931 { 932 /* S_IDLE ==> */ A_NOTHING, 933 /* S_ELECTION ==> */ A_LOG | A_ELECTION_VOTE, 934 /* S_INTEGRATION ==> */ A_LOG | A_DC_JOIN_OFFER_ALL, 935 /* S_FINALIZE_JOIN ==> */ A_LOG | A_DC_JOIN_FINALIZE, 936 /* S_NOT_DC ==> */ A_LOG | A_NOTHING, 937 /* S_POLICY_ENGINE ==> */ A_LOG | A_PE_INVOKE, 938 /* S_RECOVERY ==> */ A_LOG | A_RECOVER | O_RELEASE, 939 /* S_RELEASE_DC ==> */ A_LOG | O_RELEASE, 940 /* S_STARTING ==> */ A_LOG, 941 /* S_PENDING ==> */ A_LOG, 942 /* S_STOPPING ==> */ A_LOG, 943 /* S_TERMINATE ==> */ A_LOG, 944 /* S_TRANSITION_ENGINE ==> */ A_LOG | A_TE_INVOKE, 945 /* S_HALT ==> */ A_WARN, 946 }, 947 948 /* Got an I_TE_SUCCESS */ 949 { 950 /* S_IDLE ==> */ A_LOG, 951 /* S_ELECTION ==> */ A_WARN, 952 /* S_INTEGRATION ==> */ A_WARN, 953 /* S_FINALIZE_JOIN ==> */ A_WARN, 954 /* S_NOT_DC ==> */ A_ERROR, 955 /* S_POLICY_ENGINE ==> */ A_WARN, 956 /* S_RECOVERY ==> */ A_RECOVER | A_WARN, 957 /* S_RELEASE_DC ==> */ A_WARN, 958 /* S_STARTING ==> */ A_ERROR, 959 /* S_PENDING ==> */ A_ERROR, 960 /* S_STOPPING ==> */ A_WARN, 961 /* S_TERMINATE ==> */ A_WARN, 962 /* S_TRANSITION_ENGINE ==> */ A_LOG, 963 /* S_HALT ==> */ A_WARN, 964 }, 965 966 /* Got an I_ROUTER */ 967 { 968 /* S_IDLE ==> */ A_MSG_ROUTE, 969 /* S_ELECTION ==> */ A_MSG_ROUTE, 970 /* S_INTEGRATION ==> */ A_MSG_ROUTE, 971 /* S_FINALIZE_JOIN ==> */ A_MSG_ROUTE, 972 /* S_NOT_DC ==> */ A_MSG_ROUTE, 973 /* S_POLICY_ENGINE ==> */ A_MSG_ROUTE, 974 /* S_RECOVERY ==> */ A_MSG_ROUTE, 975 /* S_RELEASE_DC ==> */ A_MSG_ROUTE, 976 /* S_STARTING ==> */ A_MSG_ROUTE, 977 /* S_PENDING ==> */ A_MSG_ROUTE, 978 /* S_STOPPING ==> */ A_MSG_ROUTE, 979 /* S_TERMINATE ==> */ A_MSG_ROUTE, 980 /* S_TRANSITION_ENGINE ==> */ A_MSG_ROUTE, 981 /* S_HALT ==> */ A_WARN | A_MSG_ROUTE, 982 }, 983 984 /* Got an I_SHUTDOWN */ 985 { 986 /* S_IDLE ==> */ A_LOG | A_SHUTDOWN_REQ, 987 /* S_ELECTION ==> */ A_LOG | A_SHUTDOWN_REQ | A_ELECTION_VOTE, 988 /* S_INTEGRATION ==> */ A_LOG | A_SHUTDOWN_REQ, 989 /* S_FINALIZE_JOIN ==> */ A_LOG | A_SHUTDOWN_REQ, 990 /* S_NOT_DC ==> */ A_SHUTDOWN_REQ, 991 /* S_POLICY_ENGINE ==> */ A_LOG | A_SHUTDOWN_REQ, 992 /* S_RECOVERY ==> */ A_WARN | O_EXIT | O_RELEASE, 993 /* S_RELEASE_DC ==> */ A_WARN | A_SHUTDOWN_REQ, 994 /* S_STARTING ==> */ A_WARN | O_EXIT, 995 /* S_PENDING ==> */ A_SHUTDOWN_REQ, 996 /* S_STOPPING ==> */ A_LOG, 997 /* S_TERMINATE ==> */ A_LOG, 998 /* S_TRANSITION_ENGINE ==> */ A_WARN | A_SHUTDOWN_REQ, 999 /* S_HALT ==> */ A_WARN | A_ELECTION_START | A_SHUTDOWN_REQ, 1000 }, 1001 1002 /* Got an I_STOP */ 1003 { 1004 /* S_IDLE ==> */ A_ERROR | O_RELEASE | O_EXIT, 1005 /* S_ELECTION ==> */ O_RELEASE | O_EXIT, 1006 /* S_INTEGRATION ==> */ A_WARN | O_RELEASE | O_EXIT, 1007 /* S_FINALIZE_JOIN ==> */ A_ERROR | O_RELEASE | O_EXIT, 1008 /* S_NOT_DC ==> */ O_EXIT, 1009 /* S_POLICY_ENGINE ==> */ A_WARN | O_RELEASE | O_EXIT, 1010 /* S_RECOVERY ==> */ A_ERROR | O_RELEASE | O_EXIT, 1011 /* S_RELEASE_DC ==> */ A_ERROR | O_RELEASE | O_EXIT, 1012 /* S_STARTING ==> */ O_EXIT, 1013 /* S_PENDING ==> */ O_EXIT, 1014 /* S_STOPPING ==> */ O_EXIT, 1015 /* S_TERMINATE ==> */ A_ERROR | A_EXIT_1, 1016 /* S_TRANSITION_ENGINE ==> */ A_LOG | O_RELEASE | O_EXIT, 1017 /* S_HALT ==> */ O_RELEASE | O_EXIT | A_WARN, 1018 }, 1019 1020 /* Got an I_TERMINATE */ 1021 { 1022 /* S_IDLE ==> */ A_ERROR | O_EXIT, 1023 /* S_ELECTION ==> */ A_ERROR | O_EXIT, 1024 /* S_INTEGRATION ==> */ A_ERROR | O_EXIT, 1025 /* S_FINALIZE_JOIN ==> */ A_ERROR | O_EXIT, 1026 /* S_NOT_DC ==> */ A_ERROR | O_EXIT, 1027 /* S_POLICY_ENGINE ==> */ A_ERROR | O_EXIT, 1028 /* S_RECOVERY ==> */ A_ERROR | O_EXIT, 1029 /* S_RELEASE_DC ==> */ A_ERROR | O_EXIT, 1030 /* S_STARTING ==> */ O_EXIT, 1031 /* S_PENDING ==> */ A_ERROR | O_EXIT, 1032 /* S_STOPPING ==> */ O_EXIT, 1033 /* S_TERMINATE ==> */ O_EXIT, 1034 /* S_TRANSITION_ENGINE ==> */ A_ERROR | O_EXIT, 1035 /* S_HALT ==> */ A_ERROR | O_EXIT, 1036 }, 1037 1038 /* Got an I_STARTUP */ 1039 { 1040 /* S_IDLE ==> */ A_WARN, 1041 /* S_ELECTION ==> */ A_WARN, 1042 /* S_INTEGRATION ==> */ A_WARN, 1043 /* S_FINALIZE_JOIN ==> */ A_WARN, 1044 /* S_NOT_DC ==> */ A_WARN, 1045 /* S_POLICY_ENGINE ==> */ A_WARN, 1046 /* S_RECOVERY ==> */ A_WARN, 1047 /* S_RELEASE_DC ==> */ A_WARN, 1048 /* S_STARTING ==> */ 1049 A_LOG | A_STARTUP | A_CIB_START | A_LRM_CONNECT | A_HA_CONNECT | A_READCONFIG | A_STARTED, 1050 /* S_PENDING ==> */ A_LOG, 1051 /* S_STOPPING ==> */ A_WARN, 1052 /* S_TERMINATE ==> */ A_WARN, 1053 /* S_TRANSITION_ENGINE ==> */ A_WARN, 1054 /* S_HALT ==> */ A_WARN, 1055 }, 1056 1057 /* Got an I_PE_SUCCESS */ 1058 { 1059 /* S_IDLE ==> */ A_LOG, 1060 /* S_ELECTION ==> */ A_WARN, 1061 /* S_INTEGRATION ==> */ A_WARN, 1062 /* S_FINALIZE_JOIN ==> */ A_WARN, 1063 /* S_NOT_DC ==> */ A_NOTHING, 1064 /* S_POLICY_ENGINE ==> */ A_TE_INVOKE, 1065 /* S_RECOVERY ==> */ A_RECOVER | A_LOG, 1066 /* S_RELEASE_DC ==> */ A_LOG, 1067 /* S_STARTING ==> */ A_ERROR, 1068 /* S_PENDING ==> */ A_LOG, 1069 /* S_STOPPING ==> */ A_ERROR, 1070 /* S_TERMINATE ==> */ A_ERROR, 1071 /* S_TRANSITION_ENGINE ==> */ A_LOG, 1072 /* S_HALT ==> */ A_WARN, 1073 }, 1074 1075 /* Got an I_JOIN_OFFER */ 1076 { 1077 /* S_IDLE ==> */ A_WARN | A_CL_JOIN_REQUEST, 1078 /* S_ELECTION ==> */ A_WARN | A_ELECTION_VOTE, 1079 /* S_INTEGRATION ==> */ A_CL_JOIN_REQUEST, 1080 /* S_FINALIZE_JOIN ==> */ A_CL_JOIN_REQUEST, 1081 /* S_NOT_DC ==> */ A_CL_JOIN_REQUEST | A_DC_TIMER_STOP, 1082 /* S_POLICY_ENGINE ==> */ A_WARN | A_CL_JOIN_REQUEST, 1083 /* S_RECOVERY ==> */ A_WARN | A_CL_JOIN_REQUEST | A_DC_TIMER_STOP, 1084 /* S_RELEASE_DC ==> */ A_WARN | A_CL_JOIN_REQUEST | A_DC_TIMER_STOP, 1085 /* S_STARTING ==> */ A_LOG, 1086 /* S_PENDING ==> */ A_CL_JOIN_REQUEST | A_DC_TIMER_STOP, 1087 /* S_STOPPING ==> */ A_LOG, 1088 /* S_TERMINATE ==> */ A_LOG, 1089 /* S_TRANSITION_ENGINE ==> */ A_WARN | A_CL_JOIN_REQUEST, 1090 /* S_HALT ==> */ A_WARN, 1091 }, 1092 1093 /* Got an I_JOIN_REQUEST */ 1094 { 1095 /* S_IDLE ==> */ A_DC_JOIN_OFFER_ONE, 1096 /* S_ELECTION ==> */ A_WARN, 1097 /* S_INTEGRATION ==> */ A_DC_JOIN_PROCESS_REQ, 1098 /* S_FINALIZE_JOIN ==> */ A_DC_JOIN_OFFER_ONE, 1099 /* S_NOT_DC ==> */ A_WARN, 1100 /* S_POLICY_ENGINE ==> */ A_DC_JOIN_OFFER_ONE, 1101 /* S_RECOVERY ==> */ A_WARN, 1102 /* S_RELEASE_DC ==> */ A_WARN, 1103 /* S_STARTING ==> */ A_WARN, 1104 /* S_PENDING ==> */ A_WARN, 1105 /* S_STOPPING ==> */ A_WARN, 1106 /* S_TERMINATE ==> */ A_WARN, 1107 /* S_TRANSITION_ENGINE ==> */ A_DC_JOIN_OFFER_ONE, 1108 /* S_HALT ==> */ A_WARN, 1109 }, 1110 1111 /* Got an I_JOIN_RESULT */ 1112 { 1113 /* S_IDLE ==> */ A_ERROR | A_TE_HALT | A_DC_JOIN_OFFER_ALL, 1114 /* S_ELECTION ==> */ A_LOG, 1115 /* S_INTEGRATION ==> */ A_LOG | A_CL_JOIN_RESULT | A_DC_JOIN_PROCESS_ACK, 1116 /* S_FINALIZE_JOIN ==> */ A_CL_JOIN_RESULT | A_DC_JOIN_PROCESS_ACK, 1117 /* S_NOT_DC ==> */ A_ERROR | A_CL_JOIN_ANNOUNCE, 1118 /* S_POLICY_ENGINE ==> */ A_ERROR | A_TE_HALT | A_DC_JOIN_OFFER_ALL, 1119 /* S_RECOVERY ==> */ A_LOG, 1120 /* S_RELEASE_DC ==> */ A_LOG, 1121 /* S_STARTING ==> */ A_ERROR, 1122 /* S_PENDING ==> */ A_CL_JOIN_RESULT, 1123 /* S_STOPPING ==> */ A_ERROR, 1124 /* S_TERMINATE ==> */ A_ERROR, 1125 /* S_TRANSITION_ENGINE ==> */ A_ERROR | A_TE_HALT | A_DC_JOIN_OFFER_ALL, 1126 /* S_HALT ==> */ A_WARN, 1127 }, 1128 1129 /* Got an I_WAIT_FOR_EVENT */ 1130 { 1131 /* S_IDLE ==> */ A_LOG, 1132 /* S_ELECTION ==> */ A_LOG, 1133 /* S_INTEGRATION ==> */ A_LOG, 1134 /* S_FINALIZE_JOIN ==> */ A_LOG, 1135 /* S_NOT_DC ==> */ A_LOG, 1136 /* S_POLICY_ENGINE ==> */ A_LOG, 1137 /* S_RECOVERY ==> */ A_LOG, 1138 /* S_RELEASE_DC ==> */ A_LOG, 1139 /* S_STARTING ==> */ A_LOG, 1140 /* S_PENDING ==> */ A_LOG, 1141 /* S_STOPPING ==> */ A_LOG, 1142 /* S_TERMINATE ==> */ A_LOG, 1143 /* S_TRANSITION_ENGINE ==> */ A_LOG, 1144 /* S_HALT ==> */ A_WARN, 1145 }, 1146 1147 /* Got an I_DC_HEARTBEAT */ 1148 { 1149 /* S_IDLE ==> */ A_ERROR, 1150 /* S_ELECTION ==> */ A_WARN | A_ELECTION_VOTE, 1151 /* S_INTEGRATION ==> */ A_ERROR, 1152 /* S_FINALIZE_JOIN ==> */ A_ERROR, 1153 /* S_NOT_DC ==> */ A_NOTHING, 1154 /* S_POLICY_ENGINE ==> */ A_ERROR, 1155 /* S_RECOVERY ==> */ A_NOTHING, 1156 /* S_RELEASE_DC ==> */ A_LOG, 1157 /* S_STARTING ==> */ A_LOG, 1158 /* S_PENDING ==> */ A_LOG | A_CL_JOIN_ANNOUNCE, 1159 /* S_STOPPING ==> */ A_NOTHING, 1160 /* S_TERMINATE ==> */ A_NOTHING, 1161 /* S_TRANSITION_ENGINE ==> */ A_ERROR, 1162 /* S_HALT ==> */ A_WARN, 1163 }, 1164 1165 /* Got an I_LRM_EVENT */ 1166 { 1167 /* S_IDLE ==> */ A_LRM_EVENT, 1168 /* S_ELECTION ==> */ A_LRM_EVENT, 1169 /* S_INTEGRATION ==> */ A_LRM_EVENT, 1170 /* S_FINALIZE_JOIN ==> */ A_LRM_EVENT, 1171 /* S_NOT_DC ==> */ A_LRM_EVENT, 1172 /* S_POLICY_ENGINE ==> */ A_LRM_EVENT, 1173 /* S_RECOVERY ==> */ A_LRM_EVENT, 1174 /* S_RELEASE_DC ==> */ A_LRM_EVENT, 1175 /* S_STARTING ==> */ A_LRM_EVENT, 1176 /* S_PENDING ==> */ A_LRM_EVENT, 1177 /* S_STOPPING ==> */ A_LRM_EVENT, 1178 /* S_TERMINATE ==> */ A_LRM_EVENT, 1179 /* S_TRANSITION_ENGINE ==> */ A_LRM_EVENT, 1180 /* S_HALT ==> */ A_WARN, 1181 }, 1182 1183 /* For everyone ending up in S_PENDING, (re)start the DC timer and wait for I_JOIN_OFFER or I_NOT_DC */ 1184 /* Got an I_PENDING */ 1185 { 1186 /* S_IDLE ==> */ O_RELEASE | O_DC_TIMER_RESTART, 1187 /* S_ELECTION ==> */ O_RELEASE | O_DC_TIMER_RESTART, 1188 /* S_INTEGRATION ==> */ O_RELEASE | O_DC_TIMER_RESTART, 1189 /* S_FINALIZE_JOIN ==> */ O_RELEASE | O_DC_TIMER_RESTART, 1190 /* S_NOT_DC ==> */ A_LOG | O_DC_TIMER_RESTART, 1191 /* S_POLICY_ENGINE ==> */ O_RELEASE | O_DC_TIMER_RESTART, 1192 /* S_RECOVERY ==> */ A_WARN, 1193 /* S_RELEASE_DC ==> */ A_WARN | O_DC_TIMER_RESTART, 1194 /* S_STARTING ==> */ A_LOG | A_DC_TIMER_START | A_CL_JOIN_QUERY, 1195 /* S_PENDING ==> */ A_LOG | O_DC_TIMER_RESTART, 1196 /* S_STOPPING ==> */ A_WARN, 1197 /* S_TERMINATE ==> */ A_WARN, 1198 /* S_TRANSITION_ENGINE ==> */ O_RELEASE | O_DC_TIMER_RESTART, 1199 /* S_HALT ==> */ A_WARN, 1200 }, 1201 1202 /* Got an I_HALT */ 1203 { 1204 /* S_IDLE ==> */ A_WARN, 1205 /* S_ELECTION ==> */ A_WARN, 1206 /* S_INTEGRATION ==> */ A_WARN, 1207 /* S_FINALIZE_JOIN ==> */ A_WARN, 1208 /* S_NOT_DC ==> */ A_WARN, 1209 /* S_POLICY_ENGINE ==> */ A_WARN, 1210 /* S_RECOVERY ==> */ A_WARN, 1211 /* S_RELEASE_DC ==> */ A_WARN, 1212 /* S_STARTING ==> */ A_WARN, 1213 /* S_PENDING ==> */ A_WARN, 1214 /* S_STOPPING ==> */ A_WARN, 1215 /* S_TERMINATE ==> */ A_WARN, 1216 /* S_TRANSITION_ENGINE ==> */ A_WARN, 1217 /* S_HALT ==> */ A_WARN, 1218 }, 1219 }; 1220 1221 #endif