better report
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# python tests/resilience.py --mode failover --action-script scripts/stop-one.sh --base-url http://127.0.0.1:8084
|
||||
# Same public test as: make test-failover ACTION_SCRIPT=scripts/stop-one.sh BASE_URL=http://127.0.0.1:8084
|
||||
# On this Windows host the hook process was Git bash, because CreateProcess cannot exec a #!/bin/sh file.
|
||||
# The script and its arguments are scripts/stop-one.sh. git index mode of the hook is 100755.
|
||||
|
||||
=== before ===
|
||||
api-1 606d8436f093 status=running started=2026-11-12T15:27:01.000430042Z
|
||||
api-2 2d9cb0ed8adc status=running started=2026-11-12T15:27:00.68343251Z
|
||||
lb-1 a708afda6620 status=running started=2026-11-12T15:27:06.923950206Z
|
||||
postgres-1 9c54ddd911ba status=running started=2026-11-12T15:26:49.628819651Z
|
||||
minio-1 4aa69397a7e9 status=running started=2026-11-12T15:26:49.732842597Z
|
||||
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 128, "failed_attempts": 0, "first_recovery_seconds": 5.699}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
|
||||
=== after the hook, before any restore ===
|
||||
api-1 606d8436f093 status=running started=2026-11-12T15:27:01.000430042Z
|
||||
api-2 2d9cb0ed8adc status=exited finished=2026-11-12T15:27:30.226687078Z
|
||||
lb-1 a708afda6620 status=running started=2026-11-12T15:27:06.923950206Z
|
||||
postgres-1 9c54ddd911ba status=running started=2026-11-12T15:26:49.628819651Z
|
||||
minio-1 4aa69397a7e9 status=running started=2026-11-12T15:26:49.732842597Z
|
||||
|
||||
The test saw two instance ids before the stop. Writes recovered in 5.699 s, with 128 successes and 0 failures. api-2 stayed exited. PostgreSQL, MinIO, the LB and api-1 kept the start times from before the hook.
|
||||
|
||||
After this snapshot the stopped replica was started again with `docker compose --env-file .env up -d --wait api`. Both API replicas were healthy. That restore is not part of the hook: the hook left api-2 exited.
|
||||
@@ -0,0 +1,23 @@
|
||||
# python tests/resilience.py --mode persistence --action-script scripts/restart.sh --base-url http://127.0.0.1:8084
|
||||
# Same public test as: make test-persistence ACTION_SCRIPT=scripts/restart.sh BASE_URL=http://127.0.0.1:8084
|
||||
# On this Windows host the hook process was Git bash, because CreateProcess cannot exec a #!/bin/sh file.
|
||||
# The script and its arguments are scripts/restart.sh. git index mode of the hook is 100755.
|
||||
|
||||
=== before, docker inspect StartedAt ===
|
||||
api-1 606d8436f093 status=running started=2026-11-12T15:25:28.188004778Z
|
||||
api-2 2d9cb0ed8adc status=running started=2026-11-12T15:25:27.827643637Z
|
||||
lb-1 a708afda6620 status=running started=2026-11-12T15:25:34.521198734Z
|
||||
postgres-1 9c54ddd911ba status=running started=2026-11-12T15:25:18.149534309Z
|
||||
minio-1 4aa69397a7e9 status=running started=2026-11-12T15:25:18.110830021Z
|
||||
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
|
||||
=== after, same container ids, new StartedAt ===
|
||||
api-1 606d8436f093 status=running started=2026-11-12T15:27:01.000430042Z
|
||||
api-2 2d9cb0ed8adc status=running started=2026-11-12T15:27:00.68343251Z
|
||||
lb-1 a708afda6620 status=running started=2026-11-12T15:27:06.923950206Z
|
||||
postgres-1 9c54ddd911ba status=running started=2026-11-12T15:26:49.628819651Z
|
||||
minio-1 4aa69397a7e9 status=running started=2026-11-12T15:26:49.732842597Z
|
||||
|
||||
Container ids did not change, so the named volumes stayed. PostgreSQL, MinIO, both API replicas and the LB all received a new start time.
|
||||
@@ -2,28 +2,44 @@
|
||||
"apply": true,
|
||||
"grace_seconds": 0,
|
||||
"seeded": null,
|
||||
"scanned_originals": 37,
|
||||
"referenced": 38,
|
||||
"scanned_originals": 48,
|
||||
"referenced": 50,
|
||||
"orphans_protected_by_grace": [],
|
||||
"orphans_stale": [
|
||||
{
|
||||
"key": "originals/44d0830b-a013-482c-ae07-83805b6470c1",
|
||||
"age_seconds": 10,
|
||||
"key": "originals/ecc25a63-0271-4944-bd3a-d9c83c78c4ab",
|
||||
"age_seconds": 648,
|
||||
"size": 12
|
||||
}
|
||||
],
|
||||
"multipart_protected_by_grace": [],
|
||||
"multipart_stale": [],
|
||||
"deleted": [
|
||||
"originals/44d0830b-a013-482c-ae07-83805b6470c1"
|
||||
"originals/ecc25a63-0271-4944-bd3a-d9c83c78c4ab"
|
||||
],
|
||||
"aborted_multipart": [],
|
||||
"missing_objects": [
|
||||
"missing_protected_by_grace": [],
|
||||
"missing_in_use": [
|
||||
{
|
||||
"key": "a93d1b7ab79245ec95f792b569c3ee46"
|
||||
"id": "c9877ebc-08b1-46ba-9cb9-d9d42240db71",
|
||||
"key": "originals/c9877ebc-08b1-46ba-9cb9-d9d42240db71",
|
||||
"age_seconds": 168553,
|
||||
"in_use": true
|
||||
}
|
||||
],
|
||||
"missing_stale": [],
|
||||
"ignored_outside_prefix": [
|
||||
{
|
||||
"id": "28bbf1a8-866e-4b03-a22f-d7daa2e36157",
|
||||
"key": "c96e4c9da2114c9e837c372ef9e75e15"
|
||||
},
|
||||
{
|
||||
"key": "c96e4c9da2114c9e837c372ef9e75e15"
|
||||
"id": "69c98e0c-0660-4dc2-ae9f-1ecb52650b60",
|
||||
"key": "a93d1b7ab79245ec95f792b569c3ee46"
|
||||
}
|
||||
]
|
||||
],
|
||||
"metadata_deleted": [],
|
||||
"list_objects_ms": 14,
|
||||
"list_metadata_ms": 2,
|
||||
"elapsed_ms": 31
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"apply": false,
|
||||
"grace_seconds": 900,
|
||||
"seeded": "originals/44d0830b-a013-482c-ae07-83805b6470c1",
|
||||
"scanned_originals": 37,
|
||||
"referenced": 38,
|
||||
"seeded": "originals/ecc25a63-0271-4944-bd3a-d9c83c78c4ab",
|
||||
"scanned_originals": 45,
|
||||
"referenced": 47,
|
||||
"orphans_protected_by_grace": [
|
||||
{
|
||||
"key": "originals/44d0830b-a013-482c-ae07-83805b6470c1",
|
||||
"key": "originals/ecc25a63-0271-4944-bd3a-d9c83c78c4ab",
|
||||
"age_seconds": 0,
|
||||
"size": 12
|
||||
}
|
||||
@@ -16,12 +16,28 @@
|
||||
"multipart_stale": [],
|
||||
"deleted": [],
|
||||
"aborted_multipart": [],
|
||||
"missing_objects": [
|
||||
"missing_protected_by_grace": [],
|
||||
"missing_in_use": [
|
||||
{
|
||||
"key": "a93d1b7ab79245ec95f792b569c3ee46"
|
||||
"id": "c9877ebc-08b1-46ba-9cb9-d9d42240db71",
|
||||
"key": "originals/c9877ebc-08b1-46ba-9cb9-d9d42240db71",
|
||||
"age_seconds": 167904,
|
||||
"in_use": true
|
||||
}
|
||||
],
|
||||
"missing_stale": [],
|
||||
"ignored_outside_prefix": [
|
||||
{
|
||||
"id": "28bbf1a8-866e-4b03-a22f-d7daa2e36157",
|
||||
"key": "c96e4c9da2114c9e837c372ef9e75e15"
|
||||
},
|
||||
{
|
||||
"key": "c96e4c9da2114c9e837c372ef9e75e15"
|
||||
"id": "69c98e0c-0660-4dc2-ae9f-1ecb52650b60",
|
||||
"key": "a93d1b7ab79245ec95f792b569c3ee46"
|
||||
}
|
||||
]
|
||||
],
|
||||
"metadata_deleted": [],
|
||||
"list_objects_ms": 20,
|
||||
"list_metadata_ms": 7,
|
||||
"elapsed_ms": 30
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user