Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the error in building tc commands (#865) #867

Merged
merged 3 commits into from
Sep 2, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #865 to release-0.9


Signed-off-by: Yang Keao keao.yang@yahoo.com

What problem does this PR solve?

2020-09-02T03:47:24.659Z        INFO    chaos-daemon-server     build command   {"command": "nsenter -n/proc/20669/ns/net -- tc qdisc add dev eth0 parent 1: handle 2: netem  duplicate 80.000000 25.000000"}
2020-09-02T03:47:24.685Z        ERROR   chaos-daemon-server     error while adding tc   {"error": "error code: exit status 1, msg: Illegal \"limit\"\n"}

There is an extra space between "netem" and "duplicate" (which will lead to an "" in args).

BTW: What is the best practice of concating command line arguments? Directly working on a []string seems too complicated (as I will need to convert integer/float to string everywhere).

What is changed and how does it work?

Checklist

Tests

  • Unit test

Signed-off-by: Yang Keao <keao.yang@yahoo.com>
Signed-off-by: Yang Keao <keao.yang@yahoo.com>
Signed-off-by: Yang Keao <keao.yang@yahoo.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@cwen0
Copy link
Member

cwen0 commented Sep 2, 2020

/merge

@ti-srebot
Copy link
Contributor Author

Sorry @cwen0, you don't have permission to trigger auto merge event on this branch.

@cwen0 cwen0 merged commit bb8e8ec into chaos-mesh:release-0.9 Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 type/bug-fix A bug needs to be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants