-
Notifications
You must be signed in to change notification settings - Fork 419
test: add disk chaos injection in e2e engine #2280
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
base: main
Are you sure you want to change the base?
Conversation
test/engine/setup/chaos/disk.go
Outdated
func DiskFull(ctx context.Context, time int) (context.Context, error) { | ||
switch setup.Env.GetType() { | ||
case "host": | ||
command := "/opt/chaosblade/blade create disk fill --path /usr/local/ilogtail/ --size 409600 --timeout " + strconv.FormatInt(int64(time), 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接设定409600是不是不稳定的因素?后续万一机器换了,可能用例了就失效了,但是我们又发现不了。这个值应该是根据磁盘空间的百分比算出来的吧。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
获取磁盘空间百分比有点麻烦。调整成4096000了,4000GB应该超过了大多数磁盘的上限。设置一个很大的值,在注入故障的时候就会把磁盘打满。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4000GB 才4T,这个不够大吧。可以看下EBS的官网,云盘上限是65,536GiB
@@ -39,6 +39,9 @@ func ScenarioInitializer(ctx *godog.ScenarioContext) { | |||
// chaos | |||
ctx.Given(`^network delay package \{(\d+)\}ms for ip \{(.*)\}`, chaos.NetworkDelay) | |||
ctx.Given(`^network lost package \{(\d+)\}% for ip \{(.*)\}`, chaos.NetworkLoss) | |||
ctx.Given(`^disk full for \{(\d+)\} seconds$`, chaos.DiskFull) | |||
ctx.Given(`^disk burn read for \{(\d+)\} seconds$`, chaos.DiskBurRead) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disk burn read 没用上?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
主机监控相关的测试case会用到。
No description provided.