=== STEP_034G2 DIAGNOSE CREATE FAILURE === timestamp=20260708-121045 mode=read-only diagnostics goal: inspect failed STEP_034G create error without retrying POST forbidden: peer creation, cancel, disable, wg reload, backend restart === host === wg-access-dev Wed Jul 8 12:10:45 UTC 2026 === latest failed create backup === latest_create_backup=/root/router-ops-backups/canary-test-subscription-20260708-120936 --- files --- total 48 drwx------ 2 root root 4096 Jul 8 12:09 . drwxr-xr-x 8 root root 4096 Jul 8 12:09 .. -rw-r--r-- 1 root root 24 Jul 8 12:09 create-payload.json -rw-r--r-- 1 root root 49 Jul 8 12:09 create.err -rw-r--r-- 1 root root 6677 Jul 8 12:09 jobs-after.json -rw-r--r-- 1 root root 6677 Jul 8 12:09 jobs-before.json -rw-r--r-- 1 root root 6093 Jul 8 12:09 peers-after.json -rw-r--r-- 1 root root 6093 Jul 8 12:09 peers-before.json --- create payload --- __PAYLOAD_PLACEHOLDER__ --- create stderr --- curl: (22) The requested URL returned error: 422 --- create response file info --- --- create response head, redacted, if any --- === current API counts, read-only === peers_now_curl_rc=0 peers_now_count 20 jobs_now_curl_rc=0 jobs_now_count 36 === backend env endpoint === backend_container=wgaccess-backend WG_CLIENT_ALLOWED_IPS=0.0.0.0/0 WG_CLIENT_ENDPOINT=wg-studio.secret-studio.ru:51830 WG_CLIENT_FIRST_IP=10.253.1.10 WG_CLIENT_POOL_CIDR=10.253.0.0/16 WG_SERVER_PUBLIC_KEY=FD1J+KVZ965pCjgtO0YWxJsKANY9uz6v1P54JLkiZzY= === openapi subscription schema === SCHEMA AdminSubscriptionResponse { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "user_id": { "type": "string", "format": "uuid", "title": "User Id" }, "status": { "type": "string", "title": "Status" }, "plan_code": { "type": "string", "title": "Plan Code" }, "auto_renew": { "type": "boolean", "title": "Auto Renew" }, "paid_until": { "type": "string", "format": "date-time", "title": "Paid Until" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "canceled_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Canceled At" } }, "type": "object", "required": [ "id", "user_id", "status", "plan_code", "auto_renew", "paid_until", "created_at", "canceled_at" ], "title": "AdminSubscriptionResponse" } SCHEMA AdminUserPeerResponse { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "user_id": { "type": "string", "format": "uuid", "title": "User Id" }, "node_id": { "type": "string", "title": "Node Id" }, "public_key": { "type": "string", "title": "Public Key" }, "tunnel_ip": { "type": "string", "title": "Tunnel Ip" }, "paid_until": { "type": "string", "format": "date-time", "title": "Paid Until" }, "enabled": { "type": "boolean", "title": "Enabled" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "disabled_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Disabled At" } }, "type": "object", "required": [ "id", "user_id", "node_id", "public_key", "tunnel_ip", "paid_until", "enabled", "created_at", "disabled_at" ], "title": "AdminUserPeerResponse" } SCHEMA AgentPeerResponse { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "node_id": { "type": "string", "title": "Node Id" }, "public_key": { "type": "string", "title": "Public Key" }, "preshared_key": { "type": "string", "title": "Preshared Key" }, "tunnel_ip": { "type": "string", "title": "Tunnel Ip" }, "paid_until": { "type": "string", "format": "date-time", "title": "Paid Until" }, "enabled": { "type": "boolean", "title": "Enabled" } }, "type": "object", "required": [ "id", "node_id", "public_key", "preshared_key", "tunnel_ip", "paid_until", "enabled" ], "title": "AgentPeerResponse" } SCHEMA CancelSubscriptionResponse { "properties": { "subscription_id": { "type": "string", "format": "uuid", "title": "Subscription Id" }, "user_id": { "type": "string", "format": "uuid", "title": "User Id" }, "status": { "type": "string", "title": "Status" }, "canceled_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Canceled At" }, "disabled_peer_count": { "type": "integer", "title": "Disabled Peer Count" }, "job_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Job Ids" } }, "type": "object", "required": [ "subscription_id", "user_id", "status", "canceled_at", "disabled_peer_count", "job_ids" ], "title": "CancelSubscriptionResponse" } SCHEMA DisablePeerResponse { "properties": { "peer_id": { "type": "string", "format": "uuid", "title": "Peer Id" }, "job_id": { "type": "string", "format": "uuid", "title": "Job Id" }, "node_id": { "type": "string", "title": "Node Id" }, "public_key": { "type": "string", "title": "Public Key" }, "tunnel_ip": { "type": "string", "title": "Tunnel Ip" }, "enabled": { "type": "boolean", "title": "Enabled" } }, "type": "object", "required": [ "peer_id", "job_id", "node_id", "public_key", "tunnel_ip", "enabled" ], "title": "DisablePeerResponse" } SCHEMA ExpireSubscriptionsResponse { "properties": { "expired_subscription_count": { "type": "integer", "title": "Expired Subscription Count" }, "disabled_peer_count": { "type": "integer", "title": "Disabled Peer Count" }, "job_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Job Ids" }, "subscription_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Subscription Ids" } }, "type": "object", "required": [ "expired_subscription_count", "disabled_peer_count", "job_ids", "subscription_ids" ], "title": "ExpireSubscriptionsResponse" } SCHEMA PeerResponse { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "user_id": { "type": "string", "format": "uuid", "title": "User Id" }, "node_id": { "type": "string", "title": "Node Id" }, "public_key": { "type": "string", "title": "Public Key" }, "tunnel_ip": { "type": "string", "title": "Tunnel Ip" }, "paid_until": { "type": "string", "format": "date-time", "title": "Paid Until" }, "enabled": { "type": "boolean", "title": "Enabled" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "user_id", "node_id", "public_key", "tunnel_ip", "paid_until", "enabled", "created_at" ], "title": "PeerResponse" } SCHEMA SubscriptionCreateRequest { "properties": { "email": { "anyOf": [ { "type": "string", "format": "email" }, { "type": "null" } ], "title": "Email" }, "months": { "type": "integer", "maximum": 36.0, "minimum": 1.0, "title": "Months", "default": 1 }, "plan_code": { "type": "string", "title": "Plan Code", "default": "manual" }, "node_id": { "type": "string", "title": "Node Id", "default": "ddn-test" }, "auto_renew": { "type": "boolean", "title": "Auto Renew", "default": false } }, "type": "object", "title": "SubscriptionCreateRequest" } SCHEMA SubscriptionCreateResponse { "properties": { "user_id": { "type": "string", "format": "uuid", "title": "User Id" }, "subscription_id": { "type": "string", "format": "uuid", "title": "Subscription Id" }, "peer_id": { "type": "string", "format": "uuid", "title": "Peer Id" }, "job_id": { "type": "string", "format": "uuid", "title": "Job Id" }, "node_id": { "type": "string", "title": "Node Id" }, "tunnel_ip": { "type": "string", "title": "Tunnel Ip" }, "paid_until": { "type": "string", "format": "date-time", "title": "Paid Until" }, "private_key": { "type": "string", "title": "Private Key" }, "public_key": { "type": "string", "title": "Public Key" }, "preshared_key": { "type": "string", "title": "Preshared Key" }, "client_config": { "type": "string", "title": "Client Config" } }, "type": "object", "required": [ "user_id", "subscription_id", "peer_id", "job_id", "node_id", "tunnel_ip", "paid_until", "private_key", "public_key", "preshared_key", "client_config" ], "title": "SubscriptionCreateResponse" } SCHEMA TestPeerRequest { "properties": { "email": { "anyOf": [ { "type": "string", "format": "email" }, { "type": "null" } ], "title": "Email" }, "months": { "type": "integer", "title": "Months", "default": 2 }, "node_id": { "type": "string", "title": "Node Id", "default": "ddn-test" } }, "type": "object", "title": "TestPeerRequest" } SCHEMA TestPeerResponse { "properties": { "user_id": { "type": "string", "format": "uuid", "title": "User Id" }, "peer_id": { "type": "string", "format": "uuid", "title": "Peer Id" }, "job_id": { "type": "string", "format": "uuid", "title": "Job Id" }, "tunnel_ip": { "type": "string", "title": "Tunnel Ip" }, "paid_until": { "type": "string", "format": "date-time", "title": "Paid Until" }, "private_key": { "type": "string", "title": "Private Key" }, "public_key": { "type": "string", "title": "Public Key" }, "preshared_key": { "type": "string", "title": "Preshared Key" }, "client_config": { "type": "string", "title": "Client Config" } }, "type": "object", "required": [ "user_id", "peer_id", "job_id", "tunnel_ip", "paid_until", "private_key", "public_key", "preshared_key", "client_config" ], "title": "TestPeerResponse" } PATH /admin/subscriptions { "post": { "tags": [ "admin" ], "summary": "Create Subscription", "operationId": "create_subscription_admin_subscriptions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionCreateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionCreateResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } === successful old MGTS smoke payload hints === latest_mgts_smoke=/opt/wg-access/tmp/mgts-smoke-20260706-184120 --- smoke.env --- WORK=/opt/wg-access/tmp/mgts-smoke-20260706-184120 SUB_ID=8adb06a9-713a-46b0-8759-d11c28a797fc PEER_ID=3d03a7a2-c009-48a4-b6ff-214326d26fc0 TUNNEL_IP=10.253.1.10 PUBLIC_KEY=zUUEdc+Lac9C6fmMDVosuO3ZIYHIUDWi34UVgdjhbCU= --- create.json important fields --- user_id=13783bf9-94bb-4c90-b1c6-685a956a5c43 subscription_id=8adb06a9-713a-46b0-8759-d11c28a797fc peer_id=3d03a7a2-c009-48a4-b6ff-214326d26fc0 job_id=814ba665-f6e5-4ba4-b1ba-8af1ec4954e6 node_id=ddn-test tunnel_ip=10.253.1.10 paid_until=2026-08-05T18:41:20.288079Z public_key=zUUEdc+Lac9C6fmMDVosuO3ZIYHIUDWi34UVgdjhbCU= client_config_endpoint=192.168.30.1:51830 === backend recent logs, filtered === INFO: 172.18.0.1:50004 - "GET /health HTTP/1.1" 200 OK INFO: 172.18.0.1:50014 - "GET /health/db HTTP/1.1" 200 OK INFO: 172.18.0.1:50030 - "GET /admin/peers HTTP/1.1" 200 OK INFO: 172.18.0.1:50034 - "GET /admin/jobs HTTP/1.1" 200 OK INFO: 172.18.0.1:32908 - "POST /admin/subscriptions HTTP/1.1" 422 Unprocessable Entity === health === {"status":"ok","service":"wg-access-backend","environment":"dev"} {"status":"ok","db":1} === no forbidden actions proof === no_post_retry=1 no_peer_create=1 no_cancel=1 no_disable=1 no_wg_reload=1 no_backend_restart=1 diagnose_create_failure_done=1 === STEP_034G2 RESULT === peers_now_count=20 jobs_now_count=36 error_related_lines=26 schema_lines=11 smoke_related_lines=3 backend_health_ok_lines=2 decision=PASS_CREATE_FAILURE_DIAGNOSED