Commit 53a7f8d
authored
fix(flex): defer swarm follower wait until after runtime build (#663)
Flex containers in SWARM_MODE=start the follower alongside the leader.
The follower was blocking on the leader before cloning/building OpenEMR,
so its Docker health start_period was consumed during the wait and then
again during npm/composer—often exceeding the health check window and
failing CI.
- Introduce SWARM_WAIT_DEFERRED: followers skip
wait_for_swarm_completion until after the local flex build block, then
run wait + prepare_swarm_leader.
- Split wait vs leader prep into wait_for_swarm_completion and
prepare_swarm_leader for a clear call order.
- Fix leader takeover checks: try_become_leader always returns 0, so
gate promotion on AUTHORITY=yes instead of treating the return code as
success.
Tests:
- Bats: assert_script_syntax on flex openemr.sh; smoke checks for swarm
deferral.
Validated with: bats tests/bats/flex/openemr.bats and
./utilities/container_benchmarking/test_functionality.sh flex --test
swarm_mode
Closes #6611 parent 9aae18f commit 53a7f8d
2 files changed
Lines changed: 51 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| |||
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
| 381 | + | |
| 382 | + | |
391 | 383 | | |
392 | 384 | | |
393 | 385 | | |
| |||
400 | 392 | | |
401 | 393 | | |
402 | 394 | | |
403 | | - | |
404 | | - | |
| 395 | + | |
| 396 | + | |
405 | 397 | | |
406 | 398 | | |
407 | 399 | | |
| |||
412 | 404 | | |
413 | 405 | | |
414 | 406 | | |
415 | | - | |
416 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
417 | 412 | | |
418 | 413 | | |
419 | 414 | | |
| |||
427 | 422 | | |
428 | 423 | | |
429 | 424 | | |
| 425 | + | |
430 | 426 | | |
431 | | - | |
| 427 | + | |
| 428 | + | |
432 | 429 | | |
433 | 430 | | |
434 | 431 | | |
| |||
445 | 442 | | |
446 | 443 | | |
447 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
448 | 467 | | |
449 | 468 | | |
450 | 469 | | |
| |||
687 | 706 | | |
688 | 707 | | |
689 | 708 | | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
690 | 715 | | |
691 | 716 | | |
692 | 717 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
| |||
0 commit comments