[错误]: HTTPChaos 实验在后续注入过程中仍处于注入状态
问题描述
在首次应用 HTTP Chaos 实验时,实验的行为如预期:目标 Pod 被成功注入,实验完成后,所有受影响的 Pod 都恢复到正常状态(AllRecovered: True)。 然而,在第一次实验完成后,再次应用针对相同 Pod 的类似 HTTP Chaos 实验时,行为就变得不一致。 在某些情况下,第二次实验无法完成注入过程,并永久处于 Injecting 状态。 HTTPChaos 表单
kind: HTTPChaos
apiVersion: chaos-mesh.org/v1alpha1
metadata:
namespace: sit08
name: manual-2-delphi-game-management-1785240061563
spec:
selector:
namespaces:
- sit08
labelSelectors:
app.Kubernetes.io/instance: delphi-game-management
mode: all
target: Request
abort: true
port: 7040
path: /delphi-game-management/api/v1/games/aee2eecb-9b21-4fde-87d1-0284cfacf018/activate
method: PUT
duration: 15s部署步骤
- 部署目标应用程序。
- 运行上述 HTTPChaos 实验。
- 验证实验是否成功注入。
- 等待实验完成并确认 Pod 已完全恢复。
- 使用相同配置(或等效配置)再次应用针对相同 Pod 的 HTTPChaos 实验。
- 观察实验状态。
- 预期行为 第二次实验应与第一次相同:
- 成功注入到目标 Pod 中。
- 在配置的持续时间后完成。
- 监控器日志
failed to apply for pod sit08/delphi-game-management-7d5f95ff9-qxdrs:
rpc error: code = Unknown desc = create http chaos:
get PID of container(containerd://ab2f9fddebb1fa95c5a113db534ac753f901ce82fdd52f02e7148ba55dd58ba2):
no running task found:
task ab2f9fddebb1fa95c5a113db534ac753f901ce82fdd52f02e7148ba55dd58ba2 not found: not found
{
"type": "Warning",
"object": {
"kind": "PodHttpChaos",
"namespace": "sit08",
"name": "delphi-game-management-7d5f95ff9-qxdrs",
"uid": "a8a9d7a5-9b12-4e0c-affc-f2f71c7b899c",
"apiVersion": "chaos-mesh.org/v1alpha1",
"resourceVersion": "14759412"
},
"reason": "Failed"
}
* Chaos 守护进程日志2:01:47.088054Z ERROR handle{proxy=Proxy { opt: ProxyOpt { ipc_path: "/tmp/58c177b1-f93c-4733-b4a7-5273da237bff.sock", verbose: 2 }, net_env: NetEnv { netns: "fda298e9-5aa1ns", device: "eth0", ip: "10.131.15.70/32", bridge1: "fda298e9-5aa1b1", bridge2: "fda298e9-5aa1b2", veth1: "fda298e9-5aa1v1", veth2: "veth0", veth3: "veth1", veth4: "fda298e9-5aa1v4", save_routes: [RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([10, 131, 15, 108]), Oif(703)] }, RouteMessage { header: RouteHeader { address_family: 2, destination_prefix_length: 32, source_prefix_length: 0, tos: 0, table: 254, protocol: 3, scope: 253, kind: 1, flags: (empty) }, nlas: [Table(254), Destination([
内容来源: chaos-mesh/chaos-mesh