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

network attack: support bandwidth limit #91

Merged
merged 8 commits into from
Nov 17, 2021

Conversation

WangXiangUSTC
Copy link
Collaborator

@WangXiangUSTC WangXiangUSTC commented Sep 15, 2021

close issue #89

Signed-off-by: xiang <xiang13225080@163.com>
Signed-off-by: xiang <xiang13225080@163.com>
Signed-off-by: xiang <xiang13225080@163.com>
Signed-off-by: xiang <xiang13225080@163.com>
Signed-off-by: xiang <xiang13225080@163.com>
Signed-off-by: xiang <xiang13225080@163.com>
@WangXiangUSTC WangXiangUSTC removed the WIP label Sep 15, 2021

cmd.Flags().StringVarP(&options.Rate, "rate", "r", "", "the speed knob, allows bps, kbps, mbps, gbps, tbps unit. bps means bytes per second")
cmd.Flags().Uint32VarP(&options.Limit, "limit", "l", 0, "the number of bytes that can be queued waiting for tokens to become available")
cmd.Flags().Uint32VarP(&options.Buffer, "buffer", "b", 0, "the maximum amount of bytes that tokens can be available for instantaneously")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a little concern. Some of these parameters are required (like the rate, buffer and limit). Should we give them a better default value (but I cannot tell a reasonable value), or validate the input?

The user may run chaosd only with rate, and the command will succeed and give back a uid. However, it fails in the chaos-daemon (but the error doesn't return out, this bug has been fixed in the latest chaos-daemon).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I will add default values for them, and validate the value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, PTAL again

Signed-off-by: xiang <xiang13225080@163.com>
Signed-off-by: xiang <xiang13225080@163.com>
@cwen0 cwen0 requested a review from YangKeao November 10, 2021 09:16
Copy link
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@WangXiangUSTC WangXiangUSTC added this to In progress in Project Kanban Nov 12, 2021
Copy link
Member

@Andrewmatilde Andrewmatilde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@WangXiangUSTC WangXiangUSTC merged commit 50bfa4c into chaos-mesh:main Nov 17, 2021
@WangXiangUSTC WangXiangUSTC deleted the network_bandwidth branch November 17, 2021 07:16
@YangKeao
Copy link
Member

/merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants