开发者社区 > 云原生 > 正文

v0.6.0使用“blade create docker”时无法销毁任务并报告错误状态

发生的问题:

我在使用v0.6.0时遇到了一些错误。(v0.5.0可以正常运行以下所有场景)

1、当创建docker cpu负载实验并将其销毁时,它报告了一个801错误。直到设置的时间结束,容器的CPU可以恢复到正常值。然而,当通过blade 状态检查实验的状态时,“result.status”仍然是Successnot Destroyed。

[root@virtual102 chaosblade-0.6.0]# ./blade create docker cpu load --timeout=60 --container-id=de937970f677 --cpu-percent=40 --blade-tar-file=/tmp/chaosblade-0.6.0.tar.gz {"code":200,"success":true,"result":"458fcfbcefefe8a8"} [root@virtual102 chaosblade-0.6.0]# ./blade destroy 458fcfbcefefe8a8 {"code":801,"success":false,"error":"\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0018unknown flag: --timeout"} [root@virtual102 chaosblade-0.6.0]# ./blade destroy 458fcfbcefefe8a8 {"code":801,"success":false,"error":"\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0018unknown flag: --timeout"} [root@virtual102 chaosblade-0.6.0]# ./blade destroy 458fcfbcefefe8a8 {"code":801,"success":false,"error":"\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0018unknown flag: --timeout"} [root@virtual102 chaosblade-0.6.0]# ./blade status 458fcfbcefefe8a8 { "code": 200, "success": true, "result": { "Uid": "458fcfbcefefe8a8", "Command": "docker", "SubCommand": "cpu fullload", "Flag": " --cpu-percent=40 --container-id=de937970f677 --timeout=60 --blade-tar-file=/tmp/chaosblade-0.6.0.tar.gz", "Status": "Success", "Error": "", "CreateTime": "2020-05-28T14:24:58.841936244+08:00", "UpdateTime": "2020-05-28T14:25:00.513339936+08:00" } }

2、blade create docker mem加载遇到了相同的错误。这一次,容器的内存值没有变化,而且实验似乎不起作用。此外,在破坏实验时,发现801错误消息发生了一些变化。

[root@virtual102 chaosblade-0.6.0]# ./blade create docker mem load --blade-tar-file /tmp/chaosblade-0.6.0.tar.gz --container-id de937970f677 --mem-percent 30 --timeout 20 --mode ram {"code":200,"success":true,"result":"5c3e7818f0c2bd96"} [root@virtual102 chaosblade-0.6.0]# ./blade destroy 5c3e7818f0c2bd96 {"code":801,"success":false,"error":"\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0015unknown flag: --mode"} [root@virtual102 chaosblade-0.6.0]# ./blade destroy 5c3e7818f0c2bd96 {"code":801,"success":false,"error":"\u0002\u0000\u0000\u0000\u0000\u0000\u0000\u001cunknown flag: --mem-percent"}

期待结果:请尽快修复这些错误。由于这些bug对我的影响很大,希望0.6.0版本可以重新发布。谢谢

环境信息

root@virtual102 chaosblade-0.6.0]# docker version Client: Version: 18.09.7 API version: 1.39 Go version: go1.10.8 Git commit: 2d0083d Built: Thu Jun 27 17:56:06 2019 OS/Arch: linux/amd64 Experimental: false

Server: Docker Engine - Community Engine: Version: 18.09.7 API version: 1.39 (minimum version 1.12) Go version: go1.10.8 Git commit: 2d0083d Built: Thu Jun 27 17:26:28 2019 OS/Arch: linux/amd64 Experimental: false

[root@virtual102 chaosblade-0.6.0]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core)

chaosblade.log

time="2020-05-28T14:07:21.262592305+08:00" level=info msg="execute command: sh -c [ -e /opt/chaosblade/blade ] && echo True || echo False" time="2020-05-28T14:07:21.360794362+08:00" level=info msg="execute command: sh -c /opt/chaosblade/blade create mem load --timeout=20 --mem-percent=30 --mode=ram --uid 27385a351aa3e12a" time="2020-05-28T14:07:41.680744196+08:00" level=info msg="destroy by 27385a351aa3e12a uid, force-remove: false, target: " time="2020-05-28T14:07:41.682116696+08:00" level=info msg="execute command: sh -c /opt/chaosblade/blade destroy mem load --timeout=20 --mem-percent=30 --mode=ram" time="2020-05-28T14:07:41.843249734+08:00" level=warning msg="decode \x02\x00\x00\x00\x00\x00\x00\x18unknown flag: --timeout err, return default value, {"code":513,"success":false,"error":"unmarshal \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0018unknown flag: --timeout err: invalid character '\\x02' looking for beginning of value"}" time="2020-05-28T14:09:22.773733859+08:00" level=info msg="execute command: sh -c [ -e /opt/chaosblade/blade ] && echo True || echo False" time="2020-05-28T14:09:22.887272041+08:00" level=info msg="execute command: sh -c /opt/chaosblade/blade create mem load --mode=ram --timeout=20 --mem-percent=30 --uid 5c3e7818f0c2bd96" time="2020-05-28T14:09:43.205845569+08:00" level=info msg="destroy by 5c3e7818f0c2bd96 uid, force-remove: false, target: " time="2020-05-28T14:09:43.207169115+08:00" level=info msg="execute command: sh -c /opt/chaosblade/blade destroy mem load --mode=ram --timeout=20 --mem-percent=30" time="2020-05-28T14:09:43.369705459+08:00" level=warning msg="decode \x02\x00\x00\x00\x00\x00\x00\x15unknown flag: --mode err, return default value, {"code":513,"success":false,"error":"unmarshal \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0015unknown flag: --mode err: invalid character '\\x02' looking for beginning of value"}" time="2020-05-28T14:10:11.870686999+08:00" level=info msg="destroy by 5c3e7818f0c2bd96 uid, force-remove: false, target: " time="2020-05-28T14:10:11.871959173+08:00" level=info msg="execute command: sh -c /opt/chaosblade/blade destroy mem load --mem-percent=30 --mode=ram --timeout=20" time="2020-05-28T14:10:12.047698407+08:00" level=warning msg="decode \x02\x00\x00\x00\x00\x00\x00\x1cunknown flag: --mem-percent err, return default value, {"code":513,"success":false,"error":"unmarshal \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u001cunknown flag: --mem-percent err: invalid character '\\x02' looking for beginning of value"}" time="2020-05-28T14:24:59.163126375+08:00" level=info msg="execute command: sh -c [ -e /opt/chaosblade/blade ] && echo True || echo False" time="2020-05-28T14:24:59.258126808+08:00" level=info msg="execute command: sh -c /opt/chaosblade/blade create cpu fullload --timeout=60 --cpu-percent=40 --uid 458fcfbcefefe8a8" time="2020-05-28T14:25:36.069803518+08:00" level=info msg="destroy by 458fcfbcefefe8a8 uid, force-remove: false, target: " time="2020-05-28T14:25:36.0709802+08:00" level=info msg="execute command: sh -c /opt/chaosblade/blade destroy cpu fullload --timeout=60 --cpu-percent=40" time="2020-05-28T14:25:36.413501771+08:00" level=warning msg="decode \x02\x00\x00\x00\x00\x00\x00\x18unknown flag: --timeout err, return default value, {"code":513,"success":false,"error":"unmarshal \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0018unknown flag: --timeout err: invalid character '\\x02' looking for beginning of value"}" time="2020-05-28T14:25:39.622410287+08:00" level=info msg="destroy by 458fcfbcefefe8a8 uid, force-remove: false, target: " time="2020-05-28T14:25:39.62445542+08:00" level=info msg="execute command: sh -c /opt/chaosblade/blade destroy cpu fullload --timeout=60 --cpu-percent=40" time="2020-05-28T14:25:39.930312312+08:00" level=warning msg="decode \x02\x00\x00\x00\x00\x00\x00\x18unknown flag: --timeout err, return default value, {"code":513,"success":false,"error":"unmarshal \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0018unknown flag: --timeout err: invalid character '\\x02' looking for beginning of value"}" time="2020-05-28T14:25:42.186026149+08:00" level=info msg="destroy by 458fcfbcefefe8a8 uid, force-remove: false, target: " time="2020-05-28T14:25:42.187320158+08:00" level=info msg="execute command: sh -c /opt/chaosblade/blade destroy cpu fullload --timeout=60 --cpu-percent=40" time="2020-05-28T14:25:42.515949111+08:00" level=warning msg="decode \x02\x00\x00\x00\x00\x00\x00\x18unknown flag: --timeout err, return default value, {"code":513,"success":false,"error":"unmarshal \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u0018unknown flag: --timeout err: invalid character '\\x02' looking for beginning of value"}" time="2020-05-28T14:26:00.588881349+08:00" level=info msg="destroy by 458fcfbcefefe8a8 uid, force-remove: false, target: " time="2020-05-28T14:26:00.59021993+08:00" level=info msg="execute command: sh -c /opt/chaosblade/blade destroy cpu fullload --cpu-percent=40 --timeout=60" time="2020-05-28T14:26:00.829887622+08:00" level=warning msg="decode \x02\x00\x00\x00\x00\x00\x00\x1cunknown flag: --cpu-percent err, return default value, {"code":513,"success":false,"error":"unmarshal \u0002\u0000\u0000\u0000\u0000\u0000\u0000\u001cunknown flag: --cpu-percent err: invalid character '\\x02' looking for beginning of value"}"

原提问者GitHub用户zzzzx10

展开
收起
码字王 2023-06-12 17:15:56 81 0
1 条回答
写回答
取消 提交回答
  • 请将--blade override标志附加到命令中。我认为旧的刀片程序是在docker容器中执行的。

    原回答者GitHub用户xcaspar

    2023-06-12 17:34:58
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
应用 Docker 进行持续交付:用技术改变交付路程 立即下载
从Docker到容器服务 立即下载
构建基因数据应用生态系统—— docker in Bio/informatics 立即下载