forked from mtusi2026/mtusi2026lab4
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"status": "PASS",
|
||||
"cases": [
|
||||
{
|
||||
"stopped_service": "api1",
|
||||
"upload_instance": "aed573c5dc1b427698cd736857260125",
|
||||
"download_instance": "8686baec9bf349eaaf730210abd0f0f9",
|
||||
"recovery_seconds": 5.177,
|
||||
"transitional_errors": 3,
|
||||
"same_original": true,
|
||||
"message_preserved": true
|
||||
},
|
||||
{
|
||||
"stopped_service": "api2",
|
||||
"upload_instance": "8686baec9bf349eaaf730210abd0f0f9",
|
||||
"download_instance": "b0a517413dbf4ebc9e45ddb1aeaa17ed",
|
||||
"recovery_seconds": 5.178,
|
||||
"transitional_errors": 3,
|
||||
"same_original": true,
|
||||
"message_preserved": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ttl_seconds": 2,
|
||||
"expiry_unchanged_on_restart": true,
|
||||
"before_restart": 200,
|
||||
"after_expiry_and_restart": 401,
|
||||
"new_login": 201
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
{
|
||||
"public": {
|
||||
"service": "api1",
|
||||
"target_instance": "647fedc0b0b647b0b547ed5aef1f5807",
|
||||
"before": {
|
||||
"api1": {
|
||||
"instance_id": "647fedc0b0b647b0b547ed5aef1f5807",
|
||||
"container_id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa"
|
||||
},
|
||||
"api2": {
|
||||
"instance_id": "942c40bef1f445ac81c45a2be884bd92",
|
||||
"container_id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782"
|
||||
}
|
||||
},
|
||||
"after": {
|
||||
"api1": {
|
||||
"id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:56:52.564801544Z",
|
||||
"running": false,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"api2": {
|
||||
"id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:56:52.5053094Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"db": {
|
||||
"id": "e5b5dc582a71e2f0aaed8211dd36d8907451dac0758e70d535d088718a4f1f4d",
|
||||
"image": "sha256:665dc7b37ac52a17e298511414c21d23ffa4e6a6ef6225b3e5d59c7afb35e994",
|
||||
"started_at": "2026-11-16T18:56:52.452142757Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_pgdata"
|
||||
]
|
||||
},
|
||||
"lb": {
|
||||
"id": "d22e99234e628c4cbee573a4fb0b59d65ed7288e007b7344a88ae846c2db356c",
|
||||
"image": "sha256:1242e4006ac3f1ed15871efadca3d8d089e76f720017a1c51747133ee40cc953",
|
||||
"started_at": "2026-11-16T18:56:52.303157992Z",
|
||||
"running": true,
|
||||
"user": "haproxy",
|
||||
"volumes": []
|
||||
},
|
||||
"s3": {
|
||||
"id": "3b7b10a5cf8e4fb9a4037439d07236b7424159509aba68df2e4dc6c90cf2ccdd",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:56:52.647668601Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"d4f9b2835d6deeb9a0545f16daa10201cccbbb854acffcaa757632dfcf78c66d"
|
||||
]
|
||||
},
|
||||
"s3-storage": {
|
||||
"id": "1a0e4fea052e90d11bb4880e83bd6e69e9604e57288059ea8b41f051433e1a83",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:57:02.11531029Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_s3data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"stop_seconds": 0.902,
|
||||
"metrics": {
|
||||
"observed_instances_before": 2,
|
||||
"successful_writes": 102,
|
||||
"failed_attempts": 4,
|
||||
"first_recovery_seconds": 2.92
|
||||
}
|
||||
},
|
||||
"second_replica": {
|
||||
"service": "api2",
|
||||
"target_instance": "942c40bef1f445ac81c45a2be884bd92",
|
||||
"before": {
|
||||
"api1": {
|
||||
"instance_id": "aed573c5dc1b427698cd736857260125",
|
||||
"container_id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa"
|
||||
},
|
||||
"api2": {
|
||||
"instance_id": "942c40bef1f445ac81c45a2be884bd92",
|
||||
"container_id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782"
|
||||
}
|
||||
},
|
||||
"after": {
|
||||
"api1": {
|
||||
"id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:57:41.668499276Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"api2": {
|
||||
"id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:56:52.5053094Z",
|
||||
"running": false,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"db": {
|
||||
"id": "e5b5dc582a71e2f0aaed8211dd36d8907451dac0758e70d535d088718a4f1f4d",
|
||||
"image": "sha256:665dc7b37ac52a17e298511414c21d23ffa4e6a6ef6225b3e5d59c7afb35e994",
|
||||
"started_at": "2026-11-16T18:56:52.452142757Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_pgdata"
|
||||
]
|
||||
},
|
||||
"lb": {
|
||||
"id": "d22e99234e628c4cbee573a4fb0b59d65ed7288e007b7344a88ae846c2db356c",
|
||||
"image": "sha256:1242e4006ac3f1ed15871efadca3d8d089e76f720017a1c51747133ee40cc953",
|
||||
"started_at": "2026-11-16T18:56:52.303157992Z",
|
||||
"running": true,
|
||||
"user": "haproxy",
|
||||
"volumes": []
|
||||
},
|
||||
"s3": {
|
||||
"id": "3b7b10a5cf8e4fb9a4037439d07236b7424159509aba68df2e4dc6c90cf2ccdd",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:56:52.647668601Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"d4f9b2835d6deeb9a0545f16daa10201cccbbb854acffcaa757632dfcf78c66d"
|
||||
]
|
||||
},
|
||||
"s3-storage": {
|
||||
"id": "1a0e4fea052e90d11bb4880e83bd6e69e9604e57288059ea8b41f051433e1a83",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:57:02.11531029Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_s3data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"stop_seconds": 0.869,
|
||||
"metrics": {
|
||||
"successful_writes": 110,
|
||||
"failed_attempts": 4,
|
||||
"first_recovery_seconds": 3.111,
|
||||
"replay_on_survivor": "PASS"
|
||||
}
|
||||
},
|
||||
"status": "PASS"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"idempotency_after_restart": "PASS",
|
||||
"public_persistence": "PASS",
|
||||
"cursor_after_restart": "PASS",
|
||||
"logout_after_restart": "PASS",
|
||||
"migration_replay": "PASS",
|
||||
"database": {
|
||||
"users": 115,
|
||||
"chats": 41,
|
||||
"members": 80,
|
||||
"messages": 138,
|
||||
"sessions": 111,
|
||||
"migrations": 3,
|
||||
"idempotency_keys": 137,
|
||||
"attachments": 13,
|
||||
"message_attachments": 8,
|
||||
"expiry_fingerprint": "86c021e07561e2fdb93b5c6f7af0bb4c",
|
||||
"passwords_are_argon2id": true,
|
||||
"session_hashes_only": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"anonymous_get": 403
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"project": "kuznetsov-lab4",
|
||||
"before": {
|
||||
"api1": {
|
||||
"id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:56:31.941959576Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"api2": {
|
||||
"id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:56:32.080756562Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"db": {
|
||||
"id": "e5b5dc582a71e2f0aaed8211dd36d8907451dac0758e70d535d088718a4f1f4d",
|
||||
"image": "sha256:665dc7b37ac52a17e298511414c21d23ffa4e6a6ef6225b3e5d59c7afb35e994",
|
||||
"started_at": "2026-11-16T18:56:20.249222906Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_pgdata"
|
||||
]
|
||||
},
|
||||
"lb": {
|
||||
"id": "d22e99234e628c4cbee573a4fb0b59d65ed7288e007b7344a88ae846c2db356c",
|
||||
"image": "sha256:1242e4006ac3f1ed15871efadca3d8d089e76f720017a1c51747133ee40cc953",
|
||||
"started_at": "2026-11-16T18:56:32.342030698Z",
|
||||
"running": true,
|
||||
"user": "haproxy",
|
||||
"volumes": []
|
||||
},
|
||||
"s3": {
|
||||
"id": "3b7b10a5cf8e4fb9a4037439d07236b7424159509aba68df2e4dc6c90cf2ccdd",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:56:23.090520985Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"d4f9b2835d6deeb9a0545f16daa10201cccbbb854acffcaa757632dfcf78c66d"
|
||||
]
|
||||
},
|
||||
"s3-storage": {
|
||||
"id": "1a0e4fea052e90d11bb4880e83bd6e69e9604e57288059ea8b41f051433e1a83",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:56:20.435887024Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_s3data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"after": {
|
||||
"api1": {
|
||||
"id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:56:52.564801544Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"api2": {
|
||||
"id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:56:52.5053094Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"db": {
|
||||
"id": "e5b5dc582a71e2f0aaed8211dd36d8907451dac0758e70d535d088718a4f1f4d",
|
||||
"image": "sha256:665dc7b37ac52a17e298511414c21d23ffa4e6a6ef6225b3e5d59c7afb35e994",
|
||||
"started_at": "2026-11-16T18:56:52.452142757Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_pgdata"
|
||||
]
|
||||
},
|
||||
"lb": {
|
||||
"id": "d22e99234e628c4cbee573a4fb0b59d65ed7288e007b7344a88ae846c2db356c",
|
||||
"image": "sha256:1242e4006ac3f1ed15871efadca3d8d089e76f720017a1c51747133ee40cc953",
|
||||
"started_at": "2026-11-16T18:56:52.303157992Z",
|
||||
"running": true,
|
||||
"user": "haproxy",
|
||||
"volumes": []
|
||||
},
|
||||
"s3": {
|
||||
"id": "3b7b10a5cf8e4fb9a4037439d07236b7424159509aba68df2e4dc6c90cf2ccdd",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:56:52.647668601Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"d4f9b2835d6deeb9a0545f16daa10201cccbbb854acffcaa757632dfcf78c66d"
|
||||
]
|
||||
},
|
||||
"s3-storage": {
|
||||
"id": "1a0e4fea052e90d11bb4880e83bd6e69e9604e57288059ea8b41f051433e1a83",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:57:02.11531029Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_s3data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"service": "api2",
|
||||
"target_instance": "8686baec9bf349eaaf730210abd0f0f9",
|
||||
"before": {
|
||||
"api1": {
|
||||
"instance_id": "b0a517413dbf4ebc9e45ddb1aeaa17ed",
|
||||
"container_id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa"
|
||||
},
|
||||
"api2": {
|
||||
"instance_id": "8686baec9bf349eaaf730210abd0f0f9",
|
||||
"container_id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782"
|
||||
}
|
||||
},
|
||||
"after": {
|
||||
"api1": {
|
||||
"id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:58:12.529976408Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"api2": {
|
||||
"id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:58:01.332272261Z",
|
||||
"running": false,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"db": {
|
||||
"id": "e5b5dc582a71e2f0aaed8211dd36d8907451dac0758e70d535d088718a4f1f4d",
|
||||
"image": "sha256:665dc7b37ac52a17e298511414c21d23ffa4e6a6ef6225b3e5d59c7afb35e994",
|
||||
"started_at": "2026-11-16T18:56:52.452142757Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_pgdata"
|
||||
]
|
||||
},
|
||||
"lb": {
|
||||
"id": "d22e99234e628c4cbee573a4fb0b59d65ed7288e007b7344a88ae846c2db356c",
|
||||
"image": "sha256:1242e4006ac3f1ed15871efadca3d8d089e76f720017a1c51747133ee40cc953",
|
||||
"started_at": "2026-11-16T18:56:52.303157992Z",
|
||||
"running": true,
|
||||
"user": "haproxy",
|
||||
"volumes": []
|
||||
},
|
||||
"s3": {
|
||||
"id": "3b7b10a5cf8e4fb9a4037439d07236b7424159509aba68df2e4dc6c90cf2ccdd",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:56:52.647668601Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"d4f9b2835d6deeb9a0545f16daa10201cccbbb854acffcaa757632dfcf78c66d"
|
||||
]
|
||||
},
|
||||
"s3-storage": {
|
||||
"id": "1a0e4fea052e90d11bb4880e83bd6e69e9604e57288059ea8b41f051433e1a83",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:57:02.11531029Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_s3data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"stop_seconds": 0.786
|
||||
}
|
||||
@@ -0,0 +1,294 @@
|
||||
{
|
||||
"date_utc": "2026-11-16T18:55:42.477638+00:00",
|
||||
"platform": "Windows-11-10.0.26200-SP0",
|
||||
"source_commit": "ec540a1a725862a8619fcb758daec4ad197f0dd5",
|
||||
"worktree_dirty_at_start": true,
|
||||
"project": "kuznetsov-lab4",
|
||||
"status": "PASS",
|
||||
"private_s3": {
|
||||
"anonymous_get": 403
|
||||
},
|
||||
"persistence": {
|
||||
"idempotency_after_restart": "PASS",
|
||||
"public_persistence": "PASS",
|
||||
"cursor_after_restart": "PASS",
|
||||
"logout_after_restart": "PASS",
|
||||
"migration_replay": "PASS",
|
||||
"database": {
|
||||
"users": 115,
|
||||
"chats": 41,
|
||||
"members": 80,
|
||||
"messages": 138,
|
||||
"sessions": 111,
|
||||
"migrations": 3,
|
||||
"idempotency_keys": 137,
|
||||
"attachments": 13,
|
||||
"message_attachments": 8,
|
||||
"expiry_fingerprint": "86c021e07561e2fdb93b5c6f7af0bb4c",
|
||||
"passwords_are_argon2id": true,
|
||||
"session_hashes_only": true
|
||||
}
|
||||
},
|
||||
"failover": {
|
||||
"public": {
|
||||
"service": "api1",
|
||||
"target_instance": "647fedc0b0b647b0b547ed5aef1f5807",
|
||||
"before": {
|
||||
"api1": {
|
||||
"instance_id": "647fedc0b0b647b0b547ed5aef1f5807",
|
||||
"container_id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa"
|
||||
},
|
||||
"api2": {
|
||||
"instance_id": "942c40bef1f445ac81c45a2be884bd92",
|
||||
"container_id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782"
|
||||
}
|
||||
},
|
||||
"after": {
|
||||
"api1": {
|
||||
"id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:56:52.564801544Z",
|
||||
"running": false,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"api2": {
|
||||
"id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:56:52.5053094Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"db": {
|
||||
"id": "e5b5dc582a71e2f0aaed8211dd36d8907451dac0758e70d535d088718a4f1f4d",
|
||||
"image": "sha256:665dc7b37ac52a17e298511414c21d23ffa4e6a6ef6225b3e5d59c7afb35e994",
|
||||
"started_at": "2026-11-16T18:56:52.452142757Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_pgdata"
|
||||
]
|
||||
},
|
||||
"lb": {
|
||||
"id": "d22e99234e628c4cbee573a4fb0b59d65ed7288e007b7344a88ae846c2db356c",
|
||||
"image": "sha256:1242e4006ac3f1ed15871efadca3d8d089e76f720017a1c51747133ee40cc953",
|
||||
"started_at": "2026-11-16T18:56:52.303157992Z",
|
||||
"running": true,
|
||||
"user": "haproxy",
|
||||
"volumes": []
|
||||
},
|
||||
"s3": {
|
||||
"id": "3b7b10a5cf8e4fb9a4037439d07236b7424159509aba68df2e4dc6c90cf2ccdd",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:56:52.647668601Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"d4f9b2835d6deeb9a0545f16daa10201cccbbb854acffcaa757632dfcf78c66d"
|
||||
]
|
||||
},
|
||||
"s3-storage": {
|
||||
"id": "1a0e4fea052e90d11bb4880e83bd6e69e9604e57288059ea8b41f051433e1a83",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:57:02.11531029Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_s3data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"stop_seconds": 0.902,
|
||||
"metrics": {
|
||||
"observed_instances_before": 2,
|
||||
"successful_writes": 102,
|
||||
"failed_attempts": 4,
|
||||
"first_recovery_seconds": 2.92
|
||||
}
|
||||
},
|
||||
"second_replica": {
|
||||
"service": "api2",
|
||||
"target_instance": "942c40bef1f445ac81c45a2be884bd92",
|
||||
"before": {
|
||||
"api1": {
|
||||
"instance_id": "aed573c5dc1b427698cd736857260125",
|
||||
"container_id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa"
|
||||
},
|
||||
"api2": {
|
||||
"instance_id": "942c40bef1f445ac81c45a2be884bd92",
|
||||
"container_id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782"
|
||||
}
|
||||
},
|
||||
"after": {
|
||||
"api1": {
|
||||
"id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:57:41.668499276Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"api2": {
|
||||
"id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:56:52.5053094Z",
|
||||
"running": false,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"db": {
|
||||
"id": "e5b5dc582a71e2f0aaed8211dd36d8907451dac0758e70d535d088718a4f1f4d",
|
||||
"image": "sha256:665dc7b37ac52a17e298511414c21d23ffa4e6a6ef6225b3e5d59c7afb35e994",
|
||||
"started_at": "2026-11-16T18:56:52.452142757Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_pgdata"
|
||||
]
|
||||
},
|
||||
"lb": {
|
||||
"id": "d22e99234e628c4cbee573a4fb0b59d65ed7288e007b7344a88ae846c2db356c",
|
||||
"image": "sha256:1242e4006ac3f1ed15871efadca3d8d089e76f720017a1c51747133ee40cc953",
|
||||
"started_at": "2026-11-16T18:56:52.303157992Z",
|
||||
"running": true,
|
||||
"user": "haproxy",
|
||||
"volumes": []
|
||||
},
|
||||
"s3": {
|
||||
"id": "3b7b10a5cf8e4fb9a4037439d07236b7424159509aba68df2e4dc6c90cf2ccdd",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:56:52.647668601Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"d4f9b2835d6deeb9a0545f16daa10201cccbbb854acffcaa757632dfcf78c66d"
|
||||
]
|
||||
},
|
||||
"s3-storage": {
|
||||
"id": "1a0e4fea052e90d11bb4880e83bd6e69e9604e57288059ea8b41f051433e1a83",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:57:02.11531029Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_s3data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"stop_seconds": 0.869,
|
||||
"metrics": {
|
||||
"successful_writes": 110,
|
||||
"failed_attempts": 4,
|
||||
"first_recovery_seconds": 3.111,
|
||||
"replay_on_survivor": "PASS"
|
||||
}
|
||||
},
|
||||
"status": "PASS"
|
||||
},
|
||||
"attachments_failover": {
|
||||
"status": "PASS",
|
||||
"cases": [
|
||||
{
|
||||
"stopped_service": "api1",
|
||||
"upload_instance": "aed573c5dc1b427698cd736857260125",
|
||||
"download_instance": "8686baec9bf349eaaf730210abd0f0f9",
|
||||
"recovery_seconds": 5.177,
|
||||
"transitional_errors": 3,
|
||||
"same_original": true,
|
||||
"message_preserved": true
|
||||
},
|
||||
{
|
||||
"stopped_service": "api2",
|
||||
"upload_instance": "8686baec9bf349eaaf730210abd0f0f9",
|
||||
"download_instance": "b0a517413dbf4ebc9e45ddb1aeaa17ed",
|
||||
"recovery_seconds": 5.178,
|
||||
"transitional_errors": 3,
|
||||
"same_original": true,
|
||||
"message_preserved": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"expiry": {
|
||||
"ttl_seconds": 2,
|
||||
"expiry_unchanged_on_restart": true,
|
||||
"before_restart": 200,
|
||||
"after_expiry_and_restart": 401,
|
||||
"new_login": 201
|
||||
},
|
||||
"dependency": {
|
||||
"db": {
|
||||
"live": 200,
|
||||
"ready": 503,
|
||||
"download": 503,
|
||||
"recovered": 200
|
||||
},
|
||||
"s3": {
|
||||
"live": 200,
|
||||
"ready": 503,
|
||||
"download": 503,
|
||||
"recovered": 200
|
||||
}
|
||||
},
|
||||
"containers": {
|
||||
"api1": {
|
||||
"id": "4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:58:12.529976408Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"api2": {
|
||||
"id": "aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782",
|
||||
"image": "sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987",
|
||||
"started_at": "2026-11-16T18:58:22.264835326Z",
|
||||
"running": true,
|
||||
"user": "messenger",
|
||||
"volumes": []
|
||||
},
|
||||
"db": {
|
||||
"id": "e5b5dc582a71e2f0aaed8211dd36d8907451dac0758e70d535d088718a4f1f4d",
|
||||
"image": "sha256:665dc7b37ac52a17e298511414c21d23ffa4e6a6ef6225b3e5d59c7afb35e994",
|
||||
"started_at": "2026-11-16T18:59:07.136566022Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_pgdata"
|
||||
]
|
||||
},
|
||||
"lb": {
|
||||
"id": "d22e99234e628c4cbee573a4fb0b59d65ed7288e007b7344a88ae846c2db356c",
|
||||
"image": "sha256:1242e4006ac3f1ed15871efadca3d8d089e76f720017a1c51747133ee40cc953",
|
||||
"started_at": "2026-11-16T18:56:52.303157992Z",
|
||||
"running": true,
|
||||
"user": "haproxy",
|
||||
"volumes": []
|
||||
},
|
||||
"s3": {
|
||||
"id": "3b7b10a5cf8e4fb9a4037439d07236b7424159509aba68df2e4dc6c90cf2ccdd",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:59:19.588694013Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"d4f9b2835d6deeb9a0545f16daa10201cccbbb854acffcaa757632dfcf78c66d"
|
||||
]
|
||||
},
|
||||
"s3-storage": {
|
||||
"id": "1a0e4fea052e90d11bb4880e83bd6e69e9604e57288059ea8b41f051433e1a83",
|
||||
"image": "sha256:4b42c212543a0acd4c0e675215ecdcaf62a186ef98def76c7e12701871222d15",
|
||||
"started_at": "2026-11-16T18:57:02.11531029Z",
|
||||
"running": true,
|
||||
"user": "",
|
||||
"volumes": [
|
||||
"kuznetsov-lab4_s3data"
|
||||
]
|
||||
}
|
||||
},
|
||||
"docker": "29.9.3",
|
||||
"resources": {
|
||||
"cpus": 12,
|
||||
"memory_bytes": 16591364096
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,377 @@
|
||||
Environment ready; existing settings and secrets preserved
|
||||
$ ".\.venv\Scripts\python.exe" -X utf8 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
$ ".\.venv\Scripts\python.exe" -X utf8 scripts/validate_openapi.py
|
||||
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env config --quiet
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env config --quiet
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env build api1
|
||||
Image mtusi-messenger:kuznetsov-lab4 Building
|
||||
#1 [internal] load local bake definitions
|
||||
#1 reading from stdin 1.73kB 0.0s done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [internal] load build definition from Dockerfile
|
||||
#2 transferring dockerfile: 728B done
|
||||
#2 DONE 0.0s
|
||||
|
||||
#3 [internal] load metadata for docker.io/library/python:3.13.14-slim-bookworm@sha256:67a1e1f215ccda113cfc024e8639049257e88f273898f595b61476d128d387e8
|
||||
#3 ...
|
||||
|
||||
#4 [auth] library/python:pull token for registry-1.docker.io
|
||||
#4 DONE 0.0s
|
||||
|
||||
#3 [internal] load metadata for docker.io/library/python:3.13.14-slim-bookworm@sha256:67a1e1f215ccda113cfc024e8639049257e88f273898f595b61476d128d387e8
|
||||
#3 DONE 1.3s
|
||||
|
||||
#5 [internal] load .dockerignore
|
||||
#5 transferring context: 246B done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [internal] load build context
|
||||
#6 transferring context: 44.11kB 0.0s done
|
||||
#6 DONE 0.0s
|
||||
|
||||
#7 [1/6] FROM docker.io/library/python:3.13.14-slim-bookworm@sha256:67a1e1f215ccda113cfc024e8639049257e88f273898f595b61476d128d387e8
|
||||
#7 resolve docker.io/library/python:3.13.14-slim-bookworm@sha256:67a1e1f215ccda113cfc024e8639049257e88f273898f595b61476d128d387e8 0.0s done
|
||||
#7 DONE 0.0s
|
||||
|
||||
#8 [3/6] COPY requirements.lock .
|
||||
#8 CACHED
|
||||
|
||||
#9 [2/6] WORKDIR /app
|
||||
#9 CACHED
|
||||
|
||||
#10 [4/6] RUN python -m pip install --no-cache-dir -r requirements.lock && useradd --uid 10001 --create-home messenger
|
||||
#10 CACHED
|
||||
|
||||
#11 [5/6] COPY src ./src
|
||||
#11 DONE 0.0s
|
||||
|
||||
#12 [6/6] COPY migrations ./migrations
|
||||
#12 DONE 0.0s
|
||||
|
||||
#13 exporting to image
|
||||
#13 exporting layers 0.1s done
|
||||
#13 exporting manifest sha256:f8d7061a61c5b0d6dc38ff63b5c7e5fb23d9411fcf9d7071d5386919cacb1f6f 0.0s done
|
||||
#13 exporting config sha256:09a3a64b7d7c548e9e5a88cceac9634b397fea6b696a7507c42a6a61f7da75a8
|
||||
#13 exporting config sha256:09a3a64b7d7c548e9e5a88cceac9634b397fea6b696a7507c42a6a61f7da75a8 0.0s done
|
||||
#13 exporting attestation manifest sha256:96d8556413fd5c95153ab97264fe9d52418497607095b39a1db7be85ab6f8c5c 0.0s done
|
||||
#13 exporting manifest list sha256:eee390a810c74f1161be7bf32b7af98376bc917cc6fcb6608a45e2e084a6c987 0.0s done
|
||||
#13 naming to docker.io/library/mtusi-messenger:kuznetsov-lab4 done
|
||||
#13 unpacking to docker.io/library/mtusi-messenger:kuznetsov-lab4 0.0s done
|
||||
#13 DONE 0.2s
|
||||
|
||||
#14 resolving provenance for metadata file
|
||||
#14 DONE 0.0s
|
||||
Image mtusi-messenger:kuznetsov-lab4 Built
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env run --rm --no-deps lb haproxy -c -f /usr/local/etc/haproxy/haproxy.cfg
|
||||
Volume kuznetsov-lab4_s3data Creating
|
||||
Volume kuznetsov-lab4_s3data Creating
|
||||
Volume kuznetsov-lab4_pgdata Creating
|
||||
Volume kuznetsov-lab4_pgdata Creating
|
||||
Network kuznetsov-lab4_storage Creating
|
||||
Network kuznetsov-lab4_default Creating
|
||||
Network kuznetsov-lab4_default Creating
|
||||
Network kuznetsov-lab4_storage Creating
|
||||
Volume kuznetsov-lab4_s3data Created
|
||||
Volume kuznetsov-lab4_s3data Created
|
||||
Volume kuznetsov-lab4_pgdata Created
|
||||
Volume kuznetsov-lab4_pgdata Created
|
||||
Network kuznetsov-lab4_default Created
|
||||
Network kuznetsov-lab4_default Created
|
||||
Network kuznetsov-lab4_storage Created
|
||||
Network kuznetsov-lab4_storage Created
|
||||
Container kuznetsov-lab4-lb-run-6e253a61e397 Creating
|
||||
Container kuznetsov-lab4-lb-run-6e253a61e397 Created
|
||||
[NOTICE] (1) : [/usr/local/etc/haproxy/haproxy.cfg:35] : 'server api_ready/first' : could not resolve address 'api1', disabling server.
|
||||
[NOTICE] (1) : [/usr/local/etc/haproxy/haproxy.cfg:36] : 'server api_ready/second' : could not resolve address 'api2', disabling server.
|
||||
[NOTICE] (1) : [/usr/local/etc/haproxy/haproxy.cfg:43] : 'server api_live/first' : could not resolve address 'api1', disabling server.
|
||||
[NOTICE] (1) : [/usr/local/etc/haproxy/haproxy.cfg:44] : 'server api_live/second' : could not resolve address 'api2', disabling server.
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env up -d --no-build db migrate s3-storage s3 bootstrap api1 api2 lb
|
||||
Container kuznetsov-lab4-db-1 Creating
|
||||
Container kuznetsov-lab4-s3-storage-1 Creating
|
||||
Container kuznetsov-lab4-s3-storage-1 Created
|
||||
Container kuznetsov-lab4-s3-1 Creating
|
||||
Container kuznetsov-lab4-db-1 Created
|
||||
Container kuznetsov-lab4-migrate-1 Creating
|
||||
Container kuznetsov-lab4-s3-1 Created
|
||||
Container kuznetsov-lab4-bootstrap-1 Creating
|
||||
Container kuznetsov-lab4-migrate-1 Created
|
||||
Container kuznetsov-lab4-bootstrap-1 Created
|
||||
Container kuznetsov-lab4-api1-1 Creating
|
||||
Container kuznetsov-lab4-api2-1 Creating
|
||||
Container kuznetsov-lab4-api1-1 Created
|
||||
Container kuznetsov-lab4-api2-1 Created
|
||||
Container kuznetsov-lab4-lb-1 Creating
|
||||
Container kuznetsov-lab4-lb-1 Created
|
||||
Container kuznetsov-lab4-db-1 Starting
|
||||
Container kuznetsov-lab4-s3-storage-1 Starting
|
||||
Container kuznetsov-lab4-db-1 Started
|
||||
Container kuznetsov-lab4-db-1 Waiting
|
||||
Container kuznetsov-lab4-s3-storage-1 Started
|
||||
Container kuznetsov-lab4-s3-storage-1 Waiting
|
||||
Container kuznetsov-lab4-db-1 Healthy
|
||||
Container kuznetsov-lab4-migrate-1 Starting
|
||||
Container kuznetsov-lab4-migrate-1 Started
|
||||
Container kuznetsov-lab4-migrate-1 Waiting
|
||||
Container kuznetsov-lab4-s3-storage-1 Healthy
|
||||
Container kuznetsov-lab4-s3-1 Starting
|
||||
Container kuznetsov-lab4-s3-1 Started
|
||||
Container kuznetsov-lab4-bootstrap-1 Starting
|
||||
Container kuznetsov-lab4-bootstrap-1 Started
|
||||
Container kuznetsov-lab4-bootstrap-1 Waiting
|
||||
Container kuznetsov-lab4-migrate-1 Exited
|
||||
Container kuznetsov-lab4-bootstrap-1 Exited
|
||||
Container kuznetsov-lab4-api1-1 Starting
|
||||
Container kuznetsov-lab4-api2-1 Starting
|
||||
Container kuznetsov-lab4-api1-1 Started
|
||||
Container kuznetsov-lab4-api2-1 Started
|
||||
Container kuznetsov-lab4-lb-1 Starting
|
||||
Container kuznetsov-lab4-lb-1 Started
|
||||
Two API replicas ready through LB: http://127.0.0.1:18104
|
||||
$ ".\.venv\Scripts\python.exe" -X utf8 tests/smoke.py --base-url http://127.0.0.1:18104
|
||||
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
|
||||
$ ".\.venv\Scripts\python.exe" -X utf8 -m unittest discover -s student-tests -v
|
||||
test_auth_and_access (test_api.ApiTests.test_auth_and_access) ... ok
|
||||
test_bad_cursors_and_limits (test_api.ApiTests.test_bad_cursors_and_limits) ... ok
|
||||
test_chat_pagination (test_api.ApiTests.test_chat_pagination) ... ok
|
||||
test_chat_validation_is_atomic (test_api.ApiTests.test_chat_validation_is_atomic) ... ok
|
||||
test_invalid_json_and_content_type (test_api.ApiTests.test_invalid_json_and_content_type) ... ok
|
||||
test_message_fields_and_unicode (test_api.ApiTests.test_message_fields_and_unicode) ... ok
|
||||
test_message_pagination (test_api.ApiTests.test_message_pagination) ... ok
|
||||
test_parallel_messages (test_api.ApiTests.test_parallel_messages) ... ok
|
||||
test_parallel_username (test_api.ApiTests.test_parallel_username) ... ok
|
||||
test_read_after_write (test_api.ApiTests.test_read_after_write) ... ok
|
||||
test_user_fields (test_api.ApiTests.test_user_fields) ... ok
|
||||
test_attachment_access_and_unknown_ids (test_attachments.AttachmentTests.test_attachment_access_and_unknown_ids) ... ok
|
||||
test_bad_attachment_list_and_other_chat_do_not_create_messages (test_attachments.AttachmentTests.test_bad_attachment_list_and_other_chat_do_not_create_messages) ... ok
|
||||
test_byte_limit_and_original_at_exact_boundary (test_attachments.AttachmentTests.test_byte_limit_and_original_at_exact_boundary) ... ok
|
||||
test_chunked_body_cannot_bypass_size_limit (test_attachments.AttachmentTests.test_chunked_body_cannot_bypass_size_limit) ... ok
|
||||
test_corrupt_images_mime_and_multipart (test_attachments.AttachmentTests.test_corrupt_images_mime_and_multipart) ... ok
|
||||
test_filename_validation (test_attachments.AttachmentTests.test_filename_validation) ... ok
|
||||
test_idempotency_defaults_and_attachment_replay (test_attachments.AttachmentTests.test_idempotency_defaults_and_attachment_replay) ... ok
|
||||
test_messages_keep_attachment_order_and_allow_empty_text (test_attachments.AttachmentTests.test_messages_keep_attachment_order_and_allow_empty_text) ... ok
|
||||
test_original_png_jpeg_and_unicode_filename (test_attachments.AttachmentTests.test_original_png_jpeg_and_unicode_filename) ... ok
|
||||
test_pixel_boundary_and_decompression_bomb (test_attachments.AttachmentTests.test_pixel_boundary_and_decompression_bomb) ... ok
|
||||
test_different_body_conflicts (test_idempotency.IdempotencyTests.test_different_body_conflicts) ... ok
|
||||
test_failure_rolls_back_message_and_key (test_idempotency.IdempotencyTests.test_failure_rolls_back_message_and_key) ... ok
|
||||
test_invalid_body_does_not_reserve_key (test_idempotency.IdempotencyTests.test_invalid_body_does_not_reserve_key) ... ok
|
||||
test_key_required_and_format (test_idempotency.IdempotencyTests.test_key_required_and_format) ... ok
|
||||
test_replay_normalizes_json (test_idempotency.IdempotencyTests.test_replay_normalizes_json) ... ok
|
||||
test_replay_still_checks_access_and_session (test_idempotency.IdempotencyTests.test_replay_still_checks_access_and_session) ... ok
|
||||
test_retention_and_expired_key_reuse (test_idempotency.IdempotencyTests.test_retention_and_expired_key_reuse) ... ok
|
||||
test_same_session_on_both_instances (test_idempotency.IdempotencyTests.test_same_session_on_both_instances) ... ok
|
||||
test_scope_is_user_and_chat_not_session (test_idempotency.IdempotencyTests.test_scope_is_user_and_chat_not_session) ... ok
|
||||
test_twenty_concurrent_requests_use_both_replicas (test_idempotency.IdempotencyTests.test_twenty_concurrent_requests_use_both_replicas) ... ok
|
||||
test_logout_only_revokes_current_session (test_sessions.SessionTests.test_logout_only_revokes_current_session) ... ok
|
||||
test_malformed_basic_and_body (test_sessions.SessionTests.test_malformed_basic_and_body) ... ok
|
||||
test_only_bearer_identifies_user (test_sessions.SessionTests.test_only_bearer_identifies_user) ... ok
|
||||
test_password_boundaries_unicode_colon_spaces (test_sessions.SessionTests.test_password_boundaries_unicode_colon_spaces) ... ok
|
||||
test_password_required_and_limits (test_sessions.SessionTests.test_password_required_and_limits) ... ok
|
||||
test_wrong_and_unknown_credentials (test_sessions.SessionTests.test_wrong_and_unknown_credentials) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 37 tests in 13.371s
|
||||
|
||||
OK
|
||||
PASS: unsigned direct S3 GET denied
|
||||
$ ".\.venv\Scripts\python.exe" -X utf8 tests/resilience.py --mode persistence --action-script ".\scripts\restart.cmd" --base-url http://127.0.0.1:18104
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env run --rm --no-deps migrate
|
||||
Container kuznetsov-lab4-migrate-run-8b8da4ce1b7a Creating
|
||||
Container kuznetsov-lab4-migrate-run-8b8da4ce1b7a Created
|
||||
Already applied: 001_initial.sql
|
||||
Already applied: 002_idempotency.sql
|
||||
Already applied: 003_attachments.sql
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env run --rm --no-deps migrate
|
||||
Container kuznetsov-lab4-migrate-run-af84cd18946a Creating
|
||||
Container kuznetsov-lab4-migrate-run-af84cd18946a Created
|
||||
Already applied: 001_initial.sql
|
||||
Already applied: 002_idempotency.sql
|
||||
Already applied: 003_attachments.sql
|
||||
PASS: old session/cursor, durable logout and repeatable migrations
|
||||
$ ".\.venv\Scripts\python.exe" -X utf8 tests/resilience.py --mode failover --action-script ".\scripts\stop-one.cmd" --base-url http://127.0.0.1:18104
|
||||
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
|
||||
{"observed_instances_before": 2, "successful_writes": 102, "failed_attempts": 4, "first_recovery_seconds": 2.92}
|
||||
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env start api1 api2
|
||||
Container kuznetsov-lab4-s3-storage-1 Waiting
|
||||
Container kuznetsov-lab4-db-1 Waiting
|
||||
Container kuznetsov-lab4-s3-storage-1 Healthy
|
||||
Container kuznetsov-lab4-bootstrap-1 Starting
|
||||
Container kuznetsov-lab4-db-1 Healthy
|
||||
Container kuznetsov-lab4-migrate-1 Starting
|
||||
Container kuznetsov-lab4-bootstrap-1 Started
|
||||
Container kuznetsov-lab4-bootstrap-1 Waiting
|
||||
Container kuznetsov-lab4-migrate-1 Started
|
||||
Container kuznetsov-lab4-migrate-1 Waiting
|
||||
Container kuznetsov-lab4-migrate-1 Exited
|
||||
Container kuznetsov-lab4-bootstrap-1 Exited
|
||||
Container kuznetsov-lab4-api1-1 Starting
|
||||
Container kuznetsov-lab4-api1-1 Started
|
||||
PASS: both physical API replicas stopped separately; no lost messages or duplicates
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env start api1 api2
|
||||
Container kuznetsov-lab4-db-1 Waiting
|
||||
Container kuznetsov-lab4-s3-storage-1 Waiting
|
||||
Container kuznetsov-lab4-db-1 Healthy
|
||||
Container kuznetsov-lab4-migrate-1 Starting
|
||||
Container kuznetsov-lab4-s3-storage-1 Healthy
|
||||
Container kuznetsov-lab4-bootstrap-1 Starting
|
||||
Container kuznetsov-lab4-migrate-1 Started
|
||||
Container kuznetsov-lab4-migrate-1 Waiting
|
||||
Container kuznetsov-lab4-bootstrap-1 Started
|
||||
Container kuznetsov-lab4-bootstrap-1 Waiting
|
||||
Container kuznetsov-lab4-migrate-1 Exited
|
||||
Container kuznetsov-lab4-bootstrap-1 Exited
|
||||
Container kuznetsov-lab4-api2-1 Starting
|
||||
Container kuznetsov-lab4-api2-1 Started
|
||||
$ ".\scripts\stop-one.cmd"
|
||||
$ docker stop --timeout 3 4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa
|
||||
4b7c839ee38b9f9a972dcf2bbc6c31a089bcba584db20444467fe7f8209972aa
|
||||
Stopped only api1
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env start api1 api2
|
||||
Container kuznetsov-lab4-db-1 Waiting
|
||||
Container kuznetsov-lab4-s3-storage-1 Waiting
|
||||
Container kuznetsov-lab4-s3-storage-1 Healthy
|
||||
Container kuznetsov-lab4-bootstrap-1 Starting
|
||||
Container kuznetsov-lab4-db-1 Healthy
|
||||
Container kuznetsov-lab4-migrate-1 Starting
|
||||
Container kuznetsov-lab4-bootstrap-1 Started
|
||||
Container kuznetsov-lab4-bootstrap-1 Waiting
|
||||
Container kuznetsov-lab4-migrate-1 Started
|
||||
Container kuznetsov-lab4-migrate-1 Waiting
|
||||
Container kuznetsov-lab4-migrate-1 Exited
|
||||
Container kuznetsov-lab4-bootstrap-1 Exited
|
||||
Container kuznetsov-lab4-api1-1 Starting
|
||||
Container kuznetsov-lab4-api1-1 Started
|
||||
$ ".\scripts\stop-one.cmd"
|
||||
$ docker stop --timeout 3 aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782
|
||||
aa3d724d56ac972c06f6d3a65daf6249cc9a20165c9c829cac7fc3615cc09782
|
||||
Stopped only api2
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env start api1 api2
|
||||
Container kuznetsov-lab4-s3-storage-1 Waiting
|
||||
Container kuznetsov-lab4-db-1 Waiting
|
||||
Container kuznetsov-lab4-s3-storage-1 Healthy
|
||||
Container kuznetsov-lab4-bootstrap-1 Starting
|
||||
Container kuznetsov-lab4-db-1 Healthy
|
||||
Container kuznetsov-lab4-migrate-1 Starting
|
||||
Container kuznetsov-lab4-bootstrap-1 Started
|
||||
Container kuznetsov-lab4-bootstrap-1 Waiting
|
||||
Container kuznetsov-lab4-migrate-1 Started
|
||||
Container kuznetsov-lab4-migrate-1 Waiting
|
||||
Container kuznetsov-lab4-migrate-1 Exited
|
||||
Container kuznetsov-lab4-bootstrap-1 Exited
|
||||
Container kuznetsov-lab4-api2-1 Starting
|
||||
Container kuznetsov-lab4-api2-1 Started
|
||||
PASS: stopped each uploader; other API downloaded the same original
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env start api1 api2
|
||||
Container kuznetsov-lab4-s3-storage-1 Waiting
|
||||
Container kuznetsov-lab4-db-1 Waiting
|
||||
Container kuznetsov-lab4-db-1 Healthy
|
||||
Container kuznetsov-lab4-migrate-1 Starting
|
||||
Container kuznetsov-lab4-s3-storage-1 Healthy
|
||||
Container kuznetsov-lab4-bootstrap-1 Starting
|
||||
Container kuznetsov-lab4-migrate-1 Started
|
||||
Container kuznetsov-lab4-migrate-1 Waiting
|
||||
Container kuznetsov-lab4-bootstrap-1 Started
|
||||
Container kuznetsov-lab4-bootstrap-1 Waiting
|
||||
Container kuznetsov-lab4-migrate-1 Exited
|
||||
Container kuznetsov-lab4-bootstrap-1 Exited
|
||||
$ docker compose --project-name kuznetsov-lab4-ttl --env-file .env up -d --no-build db migrate s3-storage s3 bootstrap api1 api2 lb
|
||||
Volume kuznetsov-lab4-ttl_pgdata Creating
|
||||
Volume kuznetsov-lab4-ttl_pgdata Creating
|
||||
Network kuznetsov-lab4-ttl_storage Creating
|
||||
Volume kuznetsov-lab4-ttl_s3data Creating
|
||||
Network kuznetsov-lab4-ttl_default Creating
|
||||
Network kuznetsov-lab4-ttl_storage Creating
|
||||
Volume kuznetsov-lab4-ttl_s3data Creating
|
||||
Network kuznetsov-lab4-ttl_default Creating
|
||||
Volume kuznetsov-lab4-ttl_pgdata Created
|
||||
Volume kuznetsov-lab4-ttl_pgdata Created
|
||||
Volume kuznetsov-lab4-ttl_s3data Created
|
||||
Volume kuznetsov-lab4-ttl_s3data Created
|
||||
Network kuznetsov-lab4-ttl_storage Created
|
||||
Network kuznetsov-lab4-ttl_storage Created
|
||||
Container kuznetsov-lab4-ttl-s3-storage-1 Creating
|
||||
Network kuznetsov-lab4-ttl_default Created
|
||||
Network kuznetsov-lab4-ttl_default Created
|
||||
Container kuznetsov-lab4-ttl-db-1 Creating
|
||||
Container kuznetsov-lab4-ttl-s3-storage-1 Created
|
||||
Container kuznetsov-lab4-ttl-s3-1 Creating
|
||||
Container kuznetsov-lab4-ttl-db-1 Created
|
||||
Container kuznetsov-lab4-ttl-migrate-1 Creating
|
||||
Container kuznetsov-lab4-ttl-s3-1 Created
|
||||
Container kuznetsov-lab4-ttl-bootstrap-1 Creating
|
||||
Container kuznetsov-lab4-ttl-migrate-1 Created
|
||||
Container kuznetsov-lab4-ttl-bootstrap-1 Created
|
||||
Container kuznetsov-lab4-ttl-api1-1 Creating
|
||||
Container kuznetsov-lab4-ttl-api2-1 Creating
|
||||
Container kuznetsov-lab4-ttl-api2-1 Created
|
||||
Container kuznetsov-lab4-ttl-api1-1 Created
|
||||
Container kuznetsov-lab4-ttl-lb-1 Creating
|
||||
Container kuznetsov-lab4-ttl-lb-1 Created
|
||||
Container kuznetsov-lab4-ttl-db-1 Starting
|
||||
Container kuznetsov-lab4-ttl-s3-storage-1 Starting
|
||||
Container kuznetsov-lab4-ttl-db-1 Started
|
||||
Container kuznetsov-lab4-ttl-db-1 Waiting
|
||||
Container kuznetsov-lab4-ttl-s3-storage-1 Started
|
||||
Container kuznetsov-lab4-ttl-s3-storage-1 Waiting
|
||||
Container kuznetsov-lab4-ttl-db-1 Healthy
|
||||
Container kuznetsov-lab4-ttl-migrate-1 Starting
|
||||
Container kuznetsov-lab4-ttl-migrate-1 Started
|
||||
Container kuznetsov-lab4-ttl-migrate-1 Waiting
|
||||
Container kuznetsov-lab4-ttl-s3-storage-1 Healthy
|
||||
Container kuznetsov-lab4-ttl-s3-1 Starting
|
||||
Container kuznetsov-lab4-ttl-s3-1 Started
|
||||
Container kuznetsov-lab4-ttl-bootstrap-1 Starting
|
||||
Container kuznetsov-lab4-ttl-bootstrap-1 Started
|
||||
Container kuznetsov-lab4-ttl-bootstrap-1 Waiting
|
||||
Container kuznetsov-lab4-ttl-migrate-1 Exited
|
||||
Container kuznetsov-lab4-ttl-bootstrap-1 Exited
|
||||
Container kuznetsov-lab4-ttl-api1-1 Starting
|
||||
Container kuznetsov-lab4-ttl-api2-1 Starting
|
||||
Container kuznetsov-lab4-ttl-api1-1 Started
|
||||
Container kuznetsov-lab4-ttl-api2-1 Started
|
||||
Container kuznetsov-lab4-ttl-lb-1 Starting
|
||||
Container kuznetsov-lab4-ttl-lb-1 Started
|
||||
Two API replicas ready through LB: http://127.0.0.1:18114
|
||||
$ docker compose --project-name kuznetsov-lab4-ttl --env-file .env restart --timeout 3 api1 api2
|
||||
Container kuznetsov-lab4-ttl-api2-1 Restarting
|
||||
Container kuznetsov-lab4-ttl-api1-1 Restarting
|
||||
Container kuznetsov-lab4-ttl-api1-1 Started
|
||||
Container kuznetsov-lab4-ttl-api2-1 Started
|
||||
PASS: TTL=2, expired token rejected after API restart; fresh login works
|
||||
$ docker compose --project-name kuznetsov-lab4-ttl --env-file .env stop --timeout 10 lb api1 api2 s3 s3-storage db
|
||||
Container kuznetsov-lab4-ttl-lb-1 Stopping
|
||||
Container kuznetsov-lab4-ttl-lb-1 Stopped
|
||||
Container kuznetsov-lab4-ttl-api1-1 Stopping
|
||||
Container kuznetsov-lab4-ttl-api2-1 Stopping
|
||||
Container kuznetsov-lab4-ttl-api1-1 Stopped
|
||||
Container kuznetsov-lab4-ttl-api2-1 Stopped
|
||||
Container kuznetsov-lab4-ttl-db-1 Stopping
|
||||
Container kuznetsov-lab4-ttl-s3-1 Stopping
|
||||
Container kuznetsov-lab4-ttl-db-1 Stopped
|
||||
Container kuznetsov-lab4-ttl-s3-1 Stopped
|
||||
Container kuznetsov-lab4-ttl-s3-storage-1 Stopping
|
||||
Container kuznetsov-lab4-ttl-s3-storage-1 Stopped
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env stop --timeout 10 db
|
||||
Container kuznetsov-lab4-db-1 Stopping
|
||||
Container kuznetsov-lab4-db-1 Stopped
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env start db
|
||||
Container kuznetsov-lab4-db-1 Starting
|
||||
Container kuznetsov-lab4-db-1 Started
|
||||
PASS: db outage returns bounded errors; session and file work after recovery
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env stop --timeout 10 s3
|
||||
Container kuznetsov-lab4-s3-1 Stopping
|
||||
Container kuznetsov-lab4-s3-1 Stopped
|
||||
$ docker compose --project-name kuznetsov-lab4 --env-file .env start s3
|
||||
Container kuznetsov-lab4-s3-storage-1 Waiting
|
||||
Container kuznetsov-lab4-s3-storage-1 Healthy
|
||||
Container kuznetsov-lab4-s3-1 Starting
|
||||
Container kuznetsov-lab4-s3-1 Started
|
||||
PASS: s3 outage returns bounded errors; session and file work after recovery
|
||||
$ ".\.venv\Scripts\python.exe" -X utf8 tests/smoke.py --base-url http://127.0.0.1:18104
|
||||
PASS: lab4 public API scenario; infrastructure and grading evidence remain separate.
|
||||
PASS: full lab4 verification
|
||||
Reference in New Issue
Block a user