问题排查

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

失败的实例

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 Sidecar 容器分配更多资源。如果您不知道要为边车分配多少内存,可以将 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 mount

错误代码 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 或 Persistent Volume 中提供了无效实参,错误日志将指明包含无效实参的字段。对于动态配置,请检查存储类别。对于静态预配,请选中永久性卷
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 中断预算过于严格,维护被阻止

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

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。