问题排查

本页面介绍了针对一些常见问题和错误的问题排查步骤。

FAILED 实例

FAILED 状态表示实例数据已丢失,必须删除该实例。

处于 FAILED 状态的 Parallelstore 实例会继续计费,直到被删除为止。

如需检索实例的状态,请按照 管理实例:检索实例中的说明操作。

如需删除实例,请参阅 管理实例:删除实例

dfuse 装载或网络测试期间超时

如果在装载 Parallelstore 实例时,dfuse -m 命令超时;或者如果网络测试命令(例如 self_testdaos health net-test)超时,则可能是网络连接问题所致。

如需验证与 Parallelstore 服务器的连接,请运行

self_test --use-daos-agent-env -r 1

如果测试报告连接问题,则可能是以下两个原因:

DAOS 代理在设置期间可能选择了错误的网络接口

您可能需要排除无法访问 列表中的 access_points IP 的网络接口。

  1. 运行 ifconfig 以列出可用的网络接口。示例输出可能会显示多个网络接口,例如 eth0docker0ens8lo 等。

  2. 停止 daos_agent。

  3. 修改 /etc/daos/daos_agent.yml 以排除不需要的网络接口。 取消对 exclude_fabric_ifaces 行的注释并更新值。您添加的条目特定于您的情况。例如:

    exclude_fabric_ifaces: ["docker0", "ens8", "lo"]
    
  4. 重启 daos_agent。

实例或客户端 IP 地址与内部 IP 地址冲突

Parallelstore 实例和客户端无法使用 172.17.0.0/16 子网范围内的 IP 地址。如需了解详情,请参阅已知问题

实例中存在未使用的容量时出现 ENOSPC

如果您的实例使用最小条带化或(默认的)平衡条带化,即使现有文件未使用实例的所有容量,您也可能会遇到 ENOSPC 错误。这种情况很可能发生在写入通常大于 8 GiB 的大型文件时,或者从 Cloud Storage 导入此类文件时。

使用最大文件条带化来降低出现这些错误的可能性。

Google Kubernetes Engine 问题排查

以下部分列出了一些常见问题以及解决这些问题的步骤。

工作负载 Pod 中出现 Transport endpoint is not connected

此错误是由于 dfuse 终止所致。在大多数情况下,dfuse 是因内存不足而终止的。使用 Pod 注解 gke-parallelstore/[cpu-limit|memory-limit] 为 Parallelstore 边车容器分配更多资源。如果您不知道要为其分配多少内存,可以设置 gke-parallelstore/memory-limit: "0"以移除边车内存限制 。请注意,这仅适用于 Standard 集群;对于 Autopilot 集群,您无法使用值 0 取消设置边车容器资源限制和请求。您必须为边车容器明确设置更大的资源限制。

修改注解后,您必须重启工作负载 Pod。 向正在运行的工作负载添加注解不会动态修改资源分配。

Pod 事件警告

如果您的工作负载 Pod 无法启动,请检查 Pod 事件:

kubectl describe pod POD_NAME -n NAMESPACE

以下解决方案适用于常见错误。

CSI 驱动程序启用问题

常见的 CSI 驱动程序启用错误如下:

MountVolume.MountDevice failed for volume "volume" : kubernetes.io/csi:
attacher.MountDevice failed to create newCsiDriverClient:
driver name parallelstore.csi.storage.gke.io not found in the list of registered CSI drivers
MountVolume.SetUp failed for volume "volume" : kubernetes.io/csi:
mounter.SetUpAt failed to get CSI client:
driver name parallelstore.csi.storage.gke.io not found in the list of registered CSI drivers

这些警告表明 CSI 驱动程序未启用或未运行。

如果您的集群刚刚扩缩、更新或升级,则此警告是正常的,并且应该是暂时性的。集群操作后,CSI 驱动程序 Pod 需要几分钟时间才能正常运行。

否则,请确认 CSI 驱动程序已在您的集群上启用。如需了解详情,请参阅 启用 CSI 驱动程序。如果 CSI 已启用, 每个节点都会显示一个名为 parallelstore-csi-node-id 的 Pod 正在 运行。

AttachVolume.Attach 失败

将 Pod 调度到节点后,如果使用节点装载,则卷将挂接到节点,并且系统会创建装载器 Pod。

这种情况发生在控制器上,并且涉及 attachdetach-controller 中的 AttachVolume 步骤。

错误代码 Pod 事件警告 解决方案
InvalidArgument
  • AttachVolume.Attach failed for volume "volume" : rpc error: code = InvalidArgument desc = an error occurred while preparing mount options: invalid mount options
系统将无效的装载标志传递给 PersistentVolume 或 StorageClass。 如需了解详情,请参阅受支持的 dfuse 装载选项
NotFound
  • AttachVolume.Attach failed for volume "volume" : rpc error: code = NotFound desc = failed to get instance "instance"
Parallelstore 实例不存在。验证 PersistentVolume 的 volumeHandle 是否具有正确的格式

MountVolume.MountDevice 失败

将卷挂接到节点后,卷将暂存到节点。

这种情况发生在节点上,并且涉及 kubelet 中的 MountVolume.MountDevice 步骤。

错误代码 Pod 事件警告 解决方案
FailedPrecondition
  • MountVolume.MountDevice failed for volume "volume" : rpc error: code = FailedPrecondition desc = mounter pod "pod" expected to exist but was not found
此错误通常是由于手动删除了装载器 Pod 而导致的。 删除使用 PVC 的所有工作负载并重新部署它们。 这将创建一个新的装载器 Pod。
DeadlineExceeded
  • MountVolume.MountDevice failed for volume "volume": rpc error: code = DeadlineExceeded desc = context deadline exceeded
连接到 Parallelstore 实例时出现问题。验证您的 VPC 网络 和您的访问点是否已正确配置。

MountVolume.SetUp 失败

将卷暂存到节点后,卷将被装载并提供给 Pod 上的容器。这种情况发生在节点上,并且涉及 kubelet 中的 MountVolume.SetUp 步骤。

Pod 装载

错误代码 Pod 事件警告 解决方案
ResourceExhausted
  • MountVolume.SetUp failed for volume "volume" : rpc error: code = ResourceExhausted desc = the sidecar container failed with error: signal: killed
  • MountVolume.SetUp failed for volume "volume" : rpc error: code = ResourceExhausted desc = the sidecar container terminated due to OOMKilled, exit code: 137
dfuse 进程已结束,这通常是由 内存不足 (OOM) 情况导致的。考虑使用 gke-parallelstore/memory-limit 注解来增加边车容器内存限制。

如果您不确定要为 parallelstore-sidecar 分配多少内存,建议您设置 gke-parallelstore/memory-limit: "0" 以消除 Parallelstore 施加的内存 限制。

已中止
  • MountVolume.SetUp failed for volume "volume" : rpc error: code = Aborted desc = NodePublishVolume request is aborted due to rate limit
  • MountVolume.SetUp failed for volume "volume" : rpc error: code = Aborted desc = An operation with the given volume key key already exists
由于速率限制或现有 操作,卷装载操作已中止。此警告是正常的,并且应该是暂时性的。
InvalidArgument MountVolume.SetUp failed for volume "volume" : rpc error: code = InvalidArgument desc = 如果您在 StorageClass 或 PersistentVolume 中提供了无效的实参,错误日志会指明包含 无效实参的字段。对于动态预配,请检查 存储 类别。对于静态预配,请检查 永久性 卷
FailedPrecondition MountVolume.SetUp failed for volume "volume" : rpc error: code = FailedPrecondition desc = can not find the sidecar container in Pod spec Parallelstore 边车容器未注入。检查 gke-parallelstore/volumes: "true" Pod 注解是否设置正确。

节点装载

错误代码 Pod 事件警告 解决方案
已中止
  • MountVolume.SetUp failed for volume "volume" : rpc error: code = Aborted desc = NodePublishVolume request is aborted due to rate limit
  • MountVolume.SetUp failed for volume "volume" : rpc error: code = Aborted desc = An operation with the given volume key key already exists
由于速率限制或现有 操作,卷装载操作已中止。此警告是正常的,并且应该是暂时性的。
InvalidArgument MountVolume.SetUp failed for volume "volume" : rpc error: code = InvalidArgument desc = 如果您在 StorageClass 或 PersistentVolume 中提供了无效的参数,错误日志会指明包含无效参数的字段。对于动态预配,请检查 存储 类别。对于静态预配,请检查 永久性 卷
FailedPrecondition MountVolume.SetUp failed for volume "volume" : rpc error: code = FailedPrecondition desc = mounter pod expected to exist but was not found Parallelstore 装载器 Pod 不存在。 如果装载器 Pod 被意外删除,请重新创建所有工作负载以 提示重新创建。
DeadlineExceeded MountVolume.SetUp failed for volume "volume" : rpc error: code = DeadlineExceeded desc = timeout waiting for mounter pod gRPC server to become available 装载器 Pod 的 gRPC 服务器未启动。检查装载器 Pod 的 日志是否存在任何错误。

排查 VPC 网络问题

添加服务 servicenetworking.googleapis.com 的对等互连时权限遭拒

ERROR: (gcloud.services.vpc-peerings.connect) User [$(USER)] does not have 
permission to access services instance [servicenetworking.googleapis.com]
(or it may not exist): Permission denied to add peering for service
'servicenetworking.googleapis.com'.

此错误表示您的用户账号没有 servicenetworking.services.addPeering IAM 权限。

如需了解如何向您的账号添加以下角色之一,请参阅使用 IAM 进行访问权限控制,了解 相关说明:

  • roles/compute.networkAdmin
  • roles/servicenetworking.networksAdmin

无法在 CreateConnection 中修改分配的范围

ERROR: (gcloud.services.vpc-peerings.connect) The operation
"operations/[operation_id]" resulted in a failure "Cannot modify allocated
ranges in CreateConnection. Please use UpdateConnection.

如果您已使用不同的 IP 范围在此网络上创建了 vpc-peering,则系统会返回此错误。有两个可能的解决方案:

替换现有 IP 范围:

gcloud services vpc-peerings update \
  --network=NETWORK_NAME \
  --ranges=IP_RANGE_NAME \
  --service=servicenetworking.googleapis.com \
  --force

或者,将新的 IP 范围添加到现有连接:

  1. 检索对等互连的现有 IP 范围列表:

    EXISTING_RANGES=$(
      gcloud services vpc-peerings list \
        --network=NETWORK_NAME \
        --service=servicenetworking.googleapis.com \
        --format="value(reservedPeeringRanges.list())"
    )
    
  2. 然后,将新范围添加到对等互连:

    gcloud services vpc-peerings update \
      --network=NETWORK_NAME \
      --ranges=$EXISTING_RANGES,IP_RANGE_NAME \
      --service=servicenetworking.googleapis.com
    

IP 地址范围用尽

实例创建可能会失败,并显示以下范围用尽错误:

ERROR: (gcloud.alpha.Parallelstore.instances.create) FAILED_PRECONDITION: Invalid
resource state for "NETWORK_RANGES_NOT_AVAILABLE": IP address range exhausted

如果您看到此错误消息,请按照 VPC 指南重新创建 IP 范围或扩展现有 IP 范围。

如果您要重新创建 Parallelstore 实例,则必须重新创建 IP 范围,而不是扩展它。

由于 Pod 中断预算过于严格,维护被阻止

控制台可能会显示以下错误消息,表明由于 Pod 中断预算 (PDB) 配置为允许零个 Pod 逐出,因此无法继续维护: Google Cloud

GKE can't perform maintenance because the Pod Disruption Budget allows for 0 Pods evictions.

如果您看到此错误消息,请完成以下步骤以确定有问题的 Pod:

  1. 点击错误消息以打开错误洞察面板。

  2. 过于严苛的 Pod 中断预算 部分中查看 Pod 的名称。

  3. 如果 Pod 是 parallelstorecsi-mount,您可以忽略此错误,因为它不会阻止维护。对于任何其他 Pod,请检查您的 PDB。