IBM Cloud Docs
为什么我的 PVC 仍处于暂挂状态?

为什么我的 PVC 仍处于暂挂状态?

此故障诊断主题仅适用于运行 V 3.11的 Red Hat OpenShift 集群。

当您创建一个 PVC 并运行 "oc get pvc <pvc_name> 时,即使等待了一段时间,PVC 仍处于待定状态。

在 PVC 创建和绑定期间,IBM Cloud Object Storage 插件会执行许多不同的任务。 每个任务都可能会失败并导致不同的错误消息。

描述 PVC 并查看常见错误消息。

  1. 查找导致 PVC 保持 Pending 状态的根本原因。
    oc describe pvc <pvc_name> -n <namespace>
    
  2. 查看常见错误消息描述和解决方法。
Block Storage 错误消息
错误消息 描述 解决步骤
can't get credentials: can't get secret <secret_name>: secrets "<secret_name>" not found 用于保存 IBM Cloud Object Storage 服务凭证的 Kubernetes 私钥不在 PVC 或 pod 所在的名称空间中。 请参阅由于找不到 Kubernetes 私钥,PVC 或 pod 创建失败
can't get credentials: Wrong Secret Type.Provided secret of type XXXX.Expected type ibm/ibmc-s3fs 为 IBM Cloud Object Storage 服务实例创建的 Kubernetes 私钥不包含 type: ibm/ibmc-s3fs 编辑用于保存 IBM Cloud Object Storage 凭证的 Kubernetes 私钥,以添加或更改 typeibm/ibmc-s3fs
Bad value for ibm.io/object-store-endpoint XXXX: scheme is missing. Must be of the form http://<hostname> or https://<hostname> Bad value for ibm.io/iam-endpoint XXXX: scheme is missing. Must be of the form http://<hostname> or https://<hostname> s3fs API 或 IAM API 端点的格式错误,或者无法根据集群位置检索到 s3fs API 端点。 请参阅由于错误的 s3fs API 端点,PVC 创建失败
object-path can't be set when auto create is enabled 在存储区中使用 ibm.io/object-path 注释指定了要安装到 PVC 的现有子目录。 如果设置了子目录,则必须禁用水桶自动创建功能。 在 PVC 中,设置 ibm.io/auto-create-bucket: "false",并在 ibm.io/bucket 中提供现有存储区的名称。
bucket auto-create must be enabled when bucket auto-delete is enabled 在 PVC 中,设置了 ibm.io/auto-delete-bucket: true 以在除去 PVC 时自动删除数据、存储区和 PV。 该选项要求将“ibm.io/auto-create-bucket 设置为”true,并同时将“ibm.io/bucket 设置为”"" 在 PVC 中,设置 ibm.io/auto-create-bucket: trueibm.io/bucket: "",以便使用格式为 tmp-s3fs-xxxx 的名称自动创建存储区。
bucket can't be set when auto-delete is enabled 在 PVC 中,设置了 ibm.io/auto-delete-bucket: true 以在除去 PVC 时自动删除数据、存储区和 PV。 该选项要求将“ibm.io/auto-create-bucket 设置为”true,并同时将“ibm.io/bucket 设置为”"" 在 PVC 中,设置 ibm.io/auto-create-bucket: trueibm.io/bucket: "",以便使用格式为 tmp-s3fs-xxxx 的名称自动创建存储区。
can't create bucket using API key without service-instance-id 如果要使用 IAM API 密钥来访问 IBM Cloud Object Storage 服务实例,您必须在 Kubernetes 私钥中存储 API 密钥和 IBM Cloud Object Storage 服务实例标识。 请参阅为 Object Storage 服务凭证创建私钥
object-path “<subdirectory_name>” not found inside bucket <bucket_name> 在存储区中使用 ibm.io/object-path 注释指定了要安装到 PVC 的现有子目录。 在指定的存储区中找不到此子目录。 验证在 ibm.io/object-path 中指定的存储区中是否存在 ibm.io/bucket 中指定的子目录。
BucketAlreadyExists: The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. 您设置了 ibm.io/auto-create-bucket: true 并同时指定了存储区名称,或者指定了 IBM Cloud Object Storage 中已存在的存储区名称。 存储区名称在 IBM Cloud Object Storage 中的所有服务实例和区域中必须唯一。 确保设置 ibm.io/auto-create-bucket: false,并确保提供在 IBM Cloud Object Storage 中唯一的存储区名称。 如果要使用 IBM Cloud Object Storage 插件自动创建存储区名称,请设置 ibm.io/auto-create-bucket: trueibm.io/bucket: ""。 这将使用格式为 tmp-s3fs-xxxx 的唯一名称来创建存储区。 如果要为自动创建的存储区指定存储区名称,请设置 ibm.io/auto-create-bucket: trueibm.io/auto-delete-bucket: false 以及 ibm.io/bucket: "<bucket_name>"
can't access bucket <bucket_name>: NotFound: Not Found 您试图访问未创建的存储桶,或者您指定的存储类和s3fsAPI 端点与创建存储桶时使用的存储类和s3fsAPI 端点不匹配。 请参阅 无法访问现有存储区
Put https://s3-api.dal-us-geo.objectstorage.service.networklayer.com/<bucket_name>: net/http: invalid header field value "AWS4-HMAC-SHA256 Credential=1234a12a123a123a1a123aa1a123a123 \n/20190412/us-standard/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=12aa1abc123456aabb12aas12aa123456sb123456abc" for key Authorization Kubernetes 私钥中的值未正确编码为 Base64。 查看 Kubernetes 私钥中的值,并将每个值编码为 Base64。 您还可以使用 oc create secret 命令来创建新私钥,并让 Kubernetes 自动将值编码为 Base64。
can't access bucket <bucket_name>: Forbidden: Forbidden 您指定了 ibm.io/auto-create-bucket: false 并尝试访问未创建的存储区,IBM Cloud Object Storage HMAC 凭证的私钥访问密钥或访问密钥标识不正确,或者存储区的区域端点已更改。 您无法访问未创建的水桶。 通过设置“ibm.io/auto-create-bucket: true 和”ibm.io/bucket: "",自动创建一个水桶。 如果您是存储区的所有者,请参阅由于错误的凭证或访问被拒绝,PVC 创建失败来检查凭证。
can't create bucket <bucket_name>: AccessDenied: Access Denied 您指定了 ibm.io/auto-create-bucket: true 以在 IBM Cloud Object Storage 中自动创建存储区,但为 Kubernetes 私钥中提供的凭证分配的是 IAM 读取者服务访问角色。 此角色不允许在 IBM Cloud Object Storage 中创建存储区。 请参阅由于错误的凭证或访问被拒绝,PVC 创建失败
can't create bucket <bucket_name>: AccessForbidden: Access Forbidden 您指定了 ibm.io/auto-create-bucket: true,并在 ibm.io/bucket 中提供了现有存储区的名称。 此外,还为 Kubernetes 私钥中提供的凭证分配了 IAM 读取者服务访问角色。 此角色不允许在 IBM Cloud Object Storage 中创建存储区。 要使用现有存储区,请设置 ibm.io/auto-create-bucket: false,并在 ibm.io/bucket 中提供现有存储区的名称。 要使用现有 Kubernetes 私钥自动创建存储区,请设置 ibm.io/bucket: "",并遵循由于错误的凭证或访问被拒绝,PVC 创建失败,以验证 Kubernetes 私钥中的凭证。
can't create bucket <bucket_name>: SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. For more information, see REST Authentication and SOAP Authentication for details Kubernetes 私钥中提供的 HMAC 凭证的 IBM Cloud Object Storage 私钥访问密钥不正确。 请参阅由于错误的凭证或访问被拒绝,PVC 创建失败
can't create bucket <bucket_name>: InvalidAccessKeyId: The AWS Access Key ID you provided does not exist in our records Kubernetes 私钥中提供的 HMAC 凭证的 IBM Cloud Object Storage 访问密钥标识或私钥访问密钥不正确。 请参阅由于错误的凭证或访问被拒绝,PVC 创建失败
can't create bucket <bucket_name>: CredentialsEndpointError: failed to load credentials
can't access bucket <bucket_name>: CredentialsEndpointError: failed to load credentials
IAM 凭证的 IBM Cloud Object Storage API 密钥和 IBM Cloud Object Storage 服务实例的 GUID 不正确。 请参阅由于错误的凭证或访问被拒绝,PVC 创建失败
TokenManagerRetrieveError: error retrieving the token 当您在没有公共出站访问权的集群上使用 IAM 凭证创建 PVC 时,会发生此错误。 如果集群没有公共出站访问权,请 创建使用 HMAC 凭证的 IBM Cloud Object Storage 实例
set-access-policy not supported for classic cluster 在经典集群中安装 ibm-object-storage-plugin 并设置 bucketAccessPolicy=true 选项时发生此错误。 bucketAccessPolicy=true 选项仅用于 VPC 集群。 安装插件 并设置 bucketAccessPolicy=false 选项。