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