1.32. Submariner 端到端测试失败的故障排除
运行 Submariner 端到端测试后,您可能会遇到失败。使用以下部分帮助您对这些端到端测试失败进行故障排除。
1.32.1. 症状: Submariner 端到端数据平面测试失败 复制链接链接已复制到粘贴板!
当端到端数据平面测试失败时,Submariner 测试显示 连接器 pod 可以连接到 监听程序 pod,但后续 连接器 pod 会一直处于 侦听 阶段。
1.32.2. 解决问题: Submariner 端到端数据平面测试失败 复制链接链接已复制到粘贴板!
最大传输单元(MTU)可能会导致端到端数据平面测试失败。例如,MTU 可能会导致互联网协议安全(IPsec) 的集群间通信 失败。通过运行使用小数据包大小的端到端数据平面测试来验证 MTU 是否为故障。
要运行这类测试,请在 Submariner 工作区中运行以下命令:
subctl verify --verbose --only connectivity --context <from_context> --tocontext <to_context> --image-override submariner-nettest=quay.io/submariner/nettest:devel --packet-size 200
如果测试使用这个小数据包大小成功,您可以通过设置传输控制协议(TCP)最大片段大小(MSS)来解决连接问题。通过完成以下步骤设置 TCP MSS:
通过注解网关节点来设置 TCP MSS
clamping值。例如,运行以下命令,值为1200:oc annotate node <node_name> submariner.io/tcp-clamp-mss=1200运行以下命令重启所有
RouteAgentpod:oc delete pod -n submariner-operator -l app=submariner-routeagent
1.32.3. 症状:对于裸机集群,Submariner 端到端测试失败 复制链接链接已复制到粘贴板!
如果容器网络接口(CNI)是 OpenShiftSDN,或者将虚拟可扩展 local-area 网络(VXLAN)用于 集群 隧道,则端到端数据平面测试可能会失败。
1.32.4. 解决问题: 对于裸机集群,Submariner 端到端测试会失败 复制链接链接已复制到粘贴板!
硬件的用户数据报 Protocal (UDP)校验和计算中存在一个错误,可能是裸机集群的端到端数据平面测试失败的一个根本原因。要排除这个程序错误,请通过应用以下 YAML 文件来禁用硬件卸载:
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: disable-offload
namespace: submariner-operator
spec:
selector:
matchLabels:
app: disable-offload
template:
metadata:
labels:
app: disable-offload
spec:
tolerations:
- operator: Exists
containers:
- name: disable-offload
image: nicolaka/netshoot
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: true
capabilities:
add:
- net_admin
drop:
- all
privileged: true
readOnlyRootFilesystem: false
runAsNonRoot: false
command: ["/bin/sh", "-c"]
args:
- ethtool --offload vxlan-tunnel rx off tx off;
ethtool --offload vx-submariner rx off tx off;
sleep infinity
restartPolicy: Always
securityContext: {}
serviceAccount: submariner-routeagent
serviceAccountName: submariner-routeagent
hostNetwork: true