{
  "id": "kubernetes/volume-attach-timeout-csi",
  "signature": "AttachVolume.Attach failed for volume \"pvc-xxx\" : rpc error: code = DeadlineExceeded desc = context deadline exceeded",
  "signature_zh": "挂载卷 \"pvc-xxx\" 失败：rpc 错误：code = DeadlineExceeded desc = 上下文截止时间已超过",
  "regex": "AttachVolume\\.Attach failed for volume \"[^\"]+\" : rpc error: code = DeadlineExceeded desc = context deadline exceeded",
  "domain": "kubernetes",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "CSI driver timed out while attaching a persistent volume to a node, often due to cloud provider API throttling or network issues between the CSI controller and storage backend.",
  "root_cause_type": "generic",
  "root_cause_zh": "CSI 驱动程序在将持久卷挂载到节点时超时，通常是由于云提供商 API 限流或 CSI 控制器与存储后端之间的网络问题。",
  "versions": [
    {
      "version": "Kubernetes 1.24",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Kubernetes 1.27",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AWS EBS CSI Driver 1.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "GCE PD CSI Driver 1.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Restarting the CSI controller pod without checking cloud provider quotas or API rate limits will not resolve the underlying throttling issue.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Increasing CSI driver timeout without addressing storage backend latency only delays the failure.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Deleting and recreating the PVC/PV pair may be blocked by finalizers and does not fix the attach timeout root cause.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check CSI driver logs for specific errors: `kubectl logs -n kube-system <csi-controller-pod> csi-provisioner` and look for throttling or backend errors.",
      "success_rate": 0.85,
      "how": "Check CSI driver logs for specific errors: `kubectl logs -n kube-system <csi-controller-pod> csi-provisioner` and look for throttling or backend errors.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the CSI driver's attach timeout by setting environment variable `ATTACH_TIMEOUT=5m` in the CSI controller deployment, then restart the pods.",
      "success_rate": 0.75,
      "how": "Increase the CSI driver's attach timeout by setting environment variable `ATTACH_TIMEOUT=5m` in the CSI controller deployment, then restart the pods.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Verify cloud provider API quotas (e.g., AWS EC2 API call rate limits) and request a quota increase if needed: `aws ec2 describe-account-attributes`.",
      "success_rate": 0.8,
      "how": "Verify cloud provider API quotas (e.g., AWS EC2 API call rate limits) and request a quota increase if needed: `aws ec2 describe-account-attributes`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Check CSI driver logs for specific errors: `kubectl logs -n kube-system <csi-controller-pod> csi-provisioner` and look for throttling or backend errors.",
    "Increase the CSI driver's attach timeout by setting environment variable `ATTACH_TIMEOUT=5m` in the CSI controller deployment, then restart the pods.",
    "Verify cloud provider API quotas (e.g., AWS EC2 API call rate limits) and request a quota increase if needed: `aws ec2 describe-account-attributes`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://kubernetes.io/docs/concepts/storage/volumes/#csi",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2023-06-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}