-
Notifications
You must be signed in to change notification settings - Fork 63
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
Do not fill with the disk and it seems that -c would be ignore #212
Comments
@fbi007130 Can you make sure if the target disk has enough space? |
In addition, If you want to set -f to |
I confirm that the space is enough in the disk.After execution,it still write data in disk.dd also work after chaosd attack while -f is true. |
Can you describe the effect you want to achieve? |
I want to occupy the disk which is in the worknode and I found that there is issue while fallocate is invoke by chaos-mesh. |
Bug Report
What version of Kubernetes are you using?
kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.3", GitCommit:"a9dda44d3f9da886364993e5cbb0f2afbbeae113", GitTreeState:"clean", BuildDate:"2022-02-10T11:38:28Z", GoVersion:"go1.17.6", Compiler:"gc", Platform:"linux/amd64"}
What version of Chaos Mesh are you using?
/usr/local/chaosd-latest-linux-amd64/chaosd version
Chaosd Version: version.Info{GitVersion:"main-g8f5b737967a4c5", GitCommit:"8f5b737967a4c57ed4f9f8b0f9312b9ec73cce6a", BuildDate:"2022-08-17T06:48:40Z", GoVersion:"go1.18.2", Compiler:"gc", Platform:"linux/amd64"}
What did you do?
`:~> sudo /usr/local/chaosd-latest-linux-amd64/chaosd attack disk fill -c 100 -f false
:~> [2022/09/05 07:26:56.751 +00:00] [ERROR] [disk.go:48] ["fallocate: fallocate failed: No space left on device\n"] [error="exit status 1"] [stack="github.com/chaos-mesh/chaosd/pkg/server/chaosd.diskAttack.Attack\n\t/__w/chaosd/chaosd/pkg/server/chaosd/disk.go:48\ngithub.com/chaos-mesh/chaosd/pkg/server/chaosd.(*Server).ExecuteAttack\n\t/__w/chaosd/chaosd/pkg/server/chaosd/attack.go:105\ngithub.com/chaos-mesh/chaosd/cmd/attack.processDiskAttack\n\t/__w/chaosd/chaosd/cmd/attack/disk.go:141\nreflect.Value.call\n\t/__t/go/1.18.2/x64/src/reflect/value.go:556\nreflect.Value.Call\n\t/__t/go/1.18.2/x64/src/reflect/value.go:339\ngo.uber.org/dig.defaultInvoker\n\t/github/home/go/pkg/mod/go.uber.org/dig@v1.14.1/container.go:220\ngo.uber.org/dig.(*Scope).Invoke\n\t/github/home/go/pkg/mod/go.uber.org/dig@v1.14.1/invoke.go:92\ngo.uber.org/fx.runInvoke\n\t/github/home/go/pkg/mod/go.uber.org/fx@v1.17.1/invoke.go:93\ngo.uber.org/fx.(*module).executeInvoke\n\t/github/home/go/pkg/mod/go.uber.org/fx@v1.17.1/module.go:174\ngo.uber.org/fx.(*module).executeInvokes\n\t/github/home/go/pkg/mod/go.uber.org/fx@v1.17.1/module.go:155\ngo.uber.org/fx.New\n\t/github/home/go/pkg/mod/go.uber.org/fx@v1.17.1/app.go:534\ngithub.com/chaos-mesh/chaosd/pkg/utils.FxNewAppWithoutLog\n\t/__w/chaosd/chaosd/pkg/utils/utils.go:27\ngithub.com/chaos-mesh/chaosd/cmd/attack.NewDiskFillCommand.func1\n\t/__w/chaosd/chaosd/cmd/attack/disk.go:117\ngithub.com/spf13/cobra.(*Command).execute\n\t/github/home/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:860\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/github/home/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974\ngithub.com/spf13/cobra.(*Command).Execute\n\t/github/home/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902\nmain.main\n\t/__w/chaosd/chaosd/cmd/main.go:79\nruntime.main\n\t/__t/go/1.18.2/x64/src/runtime/proc.go:250"]
Error: exit status 1
[1]+ Exit 1 sudo /usr/local/chaosd-latest-linux-amd64/chaosd attack disk fill -c 100 -f false
**What did you expect to see?**
/dev/sda3 would be filled up and fallocate might be not display in log.What did you see instead?
``~> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 67055596 58884936 8170660 88% /
~> ls -lrth
total 46G
drwxr-xr-x 2 root root 6 May 25 2018 bin
-rw-r--r-- 1 root root 39M Sep 2 06:38 chaosd-latest-linux-amd64.tar.gz
-rw-r--r-- 1 root root 0 Sep 5 07:26 example2009840103
:~> du -d1 example2009840103
47769308 example2009840103
``
Output of chaosctl
The text was updated successfully, but these errors were encountered: