【ChaosMesh】NetworkChaos 网络带宽限制有隐含下限,导致Failed to apply chaos: failed to apply for pod

使用ChaosMesh注入NetworkChaos 的Bandwidth 带宽限制故障时,配置的rate过小时,比如1bps,会导致类似于
Failed to apply chaos: failed to apply for pod cmc/client-5f4cd5d89-gcrz8: unable to set tcs for pod client-5f4cd5d89-gcrz8
的错误提示。

稍大比如1kbps就行了。

所以网络带宽限制有一个隐含的下限,ChaosMesh 通过UI创建故障时,并不会检查这个下限。

具体下限不详,用chaosctl输出1bps错误时调试信息是这样的:

[Chaos]: test-bandwidth

[Pod]: client-5f4cd5d89-pttfd

        1. [ipset list]

        Name: test-_2c7210c5b95_net_batgt
        Type: hash:net
        Revision: 6
        Header: family inet hashsize 1024 maxelem 65536
        Size in memory: 504
        References: 2
        Number of entries: 1
        Members:
        192.168.87.121

        Name: test-_2c7210c_netport_batgt
        Type: hash:net,port
        Revision: 7
        Header: family inet hashsize 1024 maxelem 65536
        Size in memory: 456
        References: 2
        Number of entries: 0
        Members:

        Name: test-_2c7210c5b95_net_batgtold
        Type: hash:net
        Revision: 6
        Header: family inet hashsize 1024 maxelem 65536
        Size in memory: 504
        References: 0
        Number of entries: 1
        Members:
        192.168.87.121

        Name: test-_2c7210c_netport_batgtold
        Type: hash:net,port
        Revision: 7
        Header: family inet hashsize 1024 maxelem 65536
        Size in memory: 456
        References: 0
        Number of entries: 0
        Members:

        Name: test-_2c7210c5b95_set_batgt
        Type: list:set
        Revision: 3
        Header: size 8
        Size in memory: 176
        References: 0
        Number of entries: 2
        Members:
        test-_2c7210c5b95_net_batgt
        test-_2c7210c_netport_batgt

        Name: test-_2c7210c5b95_set_batgtold
        Type: list:set
        Revision: 3
        Header: size 8
        Size in memory: 176
        References: 0
        Number of entries: 2
        Members:
        test-_2c7210c5b95_net_batgt
        test-_2c7210c_netport_batgt


        2. [tc qdisc list]

        qdisc noqueue 0: dev lo root refcnt 2 
        qdisc prio 1: dev eth0 root refcnt 2 bands 4 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
        qdisc sfq 2: dev eth0 parent 1:1 limit 127p quantum 1464b depth 127 divisor 1024 
        qdisc sfq 4: dev eth0 parent 1:3 limit 127p quantum 1464b depth 127 divisor 1024 
        qdisc sfq 3: dev eth0 parent 1:2 limit 127p quantum 1464b depth 127 divisor 1024 


        3. [iptables list]

        Chain INPUT (policy ACCEPT)
        target     prot opt source               destination         
        CHAOS-INPUT  all  --  anywhere             anywhere            

        Chain FORWARD (policy ACCEPT)
        target     prot opt source               destination         

        Chain OUTPUT (policy ACCEPT)
        target     prot opt source               destination         
        CHAOS-OUTPUT  all  --  anywhere             anywhere            

        Chain CHAOS-INPUT (1 references)
        target     prot opt source               destination         

        Chain CHAOS-OUTPUT (1 references)
        target     prot opt source               destination         


        4. [podnetworkchaos]

        {
          "ipsets": [
            {
              "name": "test-_2c7210c5b95_net_batgt",
              "ipsetType": "hash:net",
              "cidrs": [
                "192.168.87.121/32"
              ],
              "source": "cmc/test-bandwidth"
            },
            {
              "name": "test-_2c7210c_netport_batgt",
              "ipsetType": "hash:net,port",
              "source": "cmc/test-bandwidth"
            },
            {
              "name": "test-_2c7210c5b95_set_batgt",
              "ipsetType": "list:set",
              "setNames": [
                "test-_2c7210c5b95_net_batgt",
                "test-_2c7210c_netport_batgt"
              ],
              "source": "cmc/test-bandwidth"
            }
          ],
          "tcs": [
            {
              "type": "bandwidth",
              "bandwidth": {
                "rate": "1bps",
                "limit": 1,
                "buffer": 1
              },
              "ipset": "test-_2c7210c5b95_set_batgt",
              "source": "cmc/test-bandwidth"
            }
          ]
        }
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值