forked from mtusi2026/mtusi2026lab3
55 lines
2.3 KiB
Plaintext
55 lines
2.3 KiB
Plaintext
$ make instances
|
||
./scripts/instances.sh
|
||
CONTAINER STATE INSTANCE PID REVISION
|
||
messenger-lab3-api-1 running/healthy bfb3f7bbb85d 23878 dev
|
||
messenger-lab3-api-2 running/healthy 6d2f6cd2b04a 23926 dev
|
||
$ make sigterm-check
|
||
python3 scripts/sigterm_check.py --base-url "http://localhost:8080"
|
||
Журнал реплики после SIGTERM:
|
||
2026-10-20 04:55:46.580 | INFO | __main__:shutdown:91 - SIGTERM: drain 1.0 с, instance=bfb3f7bbb85d: порт закрыт, keep-alive соединения закрываются после ответа
|
||
INFO: Shutting down
|
||
INFO: Waiting for application shutdown.
|
||
2026-10-20 04:55:47.701 | INFO | __main__:lifespan:54 - Application stopped, instance=bfb3f7bbb85d, connections closed
|
||
INFO: Application shutdown complete.
|
||
INFO: Finished server process [1]
|
||
{
|
||
"container": "messenger-lab3-api-1",
|
||
"instance": "bfb3f7bbb85d",
|
||
"exit_code": 0,
|
||
"shutdown_seconds": 1.53,
|
||
"limit_seconds": 10,
|
||
"instances_before": [
|
||
"6d2f6cd2b04a",
|
||
"bfb3f7bbb85d"
|
||
],
|
||
"probes_ok_after_sigterm": 354,
|
||
"instances_after_sigterm": [
|
||
"6d2f6cd2b04a",
|
||
"bfb3f7bbb85d"
|
||
],
|
||
"last_target_response_after_sigterm_seconds": 0.133,
|
||
"target_responses_after_exit": 0,
|
||
"errors_after_sigterm": 0,
|
||
"error_kinds": []
|
||
}
|
||
PASS: SIGTERM завершил messenger-lab3-api-1 за 1.53 с, LB обслужил 354 запросов без ошибок
|
||
$ make instances
|
||
./scripts/instances.sh
|
||
CONTAINER STATE INSTANCE PID REVISION
|
||
messenger-lab3-api-1 exited/unhealthy - 0 dev
|
||
messenger-lab3-api-2 running/healthy 6d2f6cd2b04a 23926 dev
|
||
$ make restore
|
||
./scripts/restore.sh
|
||
Container messenger-lab3-api-2 Running
|
||
Container messenger-lab3-api-1 Starting
|
||
Container messenger-lab3-api-1 Started
|
||
Container messenger-lab3-api-1 Waiting
|
||
Container messenger-lab3-api-2 Waiting
|
||
Container messenger-lab3-api-1 Healthy
|
||
Container messenger-lab3-api-2 Healthy
|
||
$ make instances
|
||
./scripts/instances.sh
|
||
CONTAINER STATE INSTANCE PID REVISION
|
||
messenger-lab3-api-1 running/healthy 7535b2ed4434 69183 dev
|
||
messenger-lab3-api-2 running/healthy 6d2f6cd2b04a 23926 dev
|