chaosd
chaosd copied to clipboard
the file's size not match the size set by disk write payload
create PhysicalMachineChaos in Chaos Mesh, the YAML config is below:
kind: PhysicalMachineChaos
apiVersion: chaos-mesh.org/v1alpha1
metadata:
namespace: default
name: write-payload
spec:
action: disk-write-payload
address:
- http://172.16.112.130:31767
uid: c11fa67a-ee03-4fab-9e85-77fdece0b1ff
disk-write-payload:
size: 100MB
path: /tmp/test3
payload_process_num: 5
the file's size should be 100MB, but in the host, the file's size is 19922944:
ls -l /tmp/test3
-rw-r--r-- 1 root root 19922944 Oct 27 03:56 /tmp/test3
I also met this problem.
When I simulate the disk write load with p
greater than 1, I find out the data size is size / p
. This is by design?
$ chaosd attack disk add-payload write -s 2G -n 2 -p /tmp/
[2022/04/16 19:57:11.411 +08:00] [INFO] [timeout.go:44] ["0+0 records in\n0+0 records out\n0 bytes copied, 2.1659e-05 s, 0.0 kB/s\n"]
[2022/04/16 19:57:16.963 +08:00] [INFO] [timeout.go:44] ["1024+0 records in\n1024+0 records out\n1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.55093 s, 193 MB/s\n"]
[2022/04/16 19:57:16.963 +08:00] [INFO] [timeout.go:44] ["1024+0 records in\n1024+0 records out\n1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.55109 s, 193 MB/s\n"]
Write file /tmp/example982253123 successfully, uid: 08982bf1-92e1-475e-a7b5-2056e1c576c9
$ du -sh example982253123
1.0G example982253123
/type bug
@ThreadDao: The label(s) type/bug
cannot be applied, because the repository doesn't have them.
In response to this:
/type bug
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.