{"record":{"id":"274ec4608001ea82","repo":"astrid-runtime/astrid","slug":"kernel-refused-storage-lifecycle-request-error-274ec4","errorCode":null,"errorMessage":"kernel refused storage lifecycle request: {error}","messagePattern":"kernel refused storage lifecycle request: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-winfsp/src/main.rs","lineNumber":315,"sourceCode":"    }\n    Ok(StorageProviderSuccessV1::Unmounted {\n        mount_id: record.mount_id,\n    })\n}\n\nfn lease_from_response(body: AdminResponseBody) -> Result<StorageMountLeaseV1> {\n    match body {\n        AdminResponseBody::StorageMountLease(lease) => Ok(*lease),\n        AdminResponseBody::Error(error) => bail!(\"kernel refused storage mount: {error}\"),\n        _ => bail!(\"kernel returned an unexpected storage mount response\"),\n    }\n}\n\nfn into_success(body: AdminResponseBody) -> Result<serde_json::Value> {\n    match body {\n        AdminResponseBody::Success(value) => Ok(value),\n        AdminResponseBody::Error(error) => {\n            bail!(\"kernel refused storage lifecycle request: {error}\")\n        },\n        _ => bail!(\"kernel returned an unexpected storage lifecycle response\"),\n    }\n}\n\nfn unmount_status(body: AdminResponseBody) -> Result<bool> {\n    match body {\n        AdminResponseBody::Success(_) => Ok(true),\n        AdminResponseBody::Error(error)\n            if error.contains(\"was not found\") || error.contains(\"expired or revoked\") =>\n        {\n            Ok(false)\n        },\n        AdminResponseBody::Error(error) => {\n            bail!(\"kernel refused storage unmount authorization: {error}\")\n        },\n        _ => bail!(\"kernel returned an unexpected storage unmount response\"),\n    }","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-winfsp/src/main.rs#L297-L333","documentation":"`into_success` unwraps a generic `Success` payload from an `AdminResponseBody`; when the kernel instead returns an `Error` variant, this bail surfaces the kernel's own error text prefixed with 'kernel refused storage lifecycle request'. It is the normal path for conveying kernel-side rejections of lifecycle operations (e.g. mount/unmount bookkeeping calls executed via `execute` and `unmount`) back to the caller.","triggerScenarios":"Any lifecycle admin request dispatched through `execute` or `unmount` for which the kernel responds with `AdminResponseBody::Error(error)` — e.g. the kernel rejects the request because the storage action is invalid, unauthorized, or the target resource is in a bad state.","commonSituations":"Requesting lifecycle operations on a storage assignment that does not exist or was already removed; kernel-side authorization failures; transient kernel shutdown while a lifecycle call is in flight.","solutions":["Read the embedded kernel `{error}` message in the bail output — it states the actual refusal reason","Verify the storage assignment/resource referenced by the lifecycle request exists and is in a valid state on the kernel","Re-authenticate or restart the kernel if the refusal indicates authorization or availability problems, then retry"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-validate the resource exists/valid before issuing the lifecycle request\n// e.g. check assignment status via a read-only admin query before mutating","typeGuard":null,"tryCatchPattern":"match provider.execute(action).await {\n    Ok(value) => handle(value),\n    Err(e) if e.to_string().starts_with(\"kernel refused storage lifecycle request\") => {\n        // kernel-side refusal: parse embedded reason and react\n        let reason = e.to_string();\n        log::warn!(\"lifecycle refused: {reason}\");\n    },\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Read the embedded kernel error text — it contains the actual refusal cause","Verify resource state with a read-only query before lifecycle mutations","Retry only after fixing the underlying kernel-side condition, not blindly"],"tags":["ipc","kernel-refusal","storage","winfsp"],"backgroundTag":"api-error-response","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}