opencomputeproject / ocp-diag-autoval-ssd

MIT License
10 stars 1 forks source link

random pattern run FIO with parameter args RWMIX and RW will failed #11

Open kwzhu123 opened 2 months ago

kwzhu123 commented 2 months ago

1.run case /src/autoval_ssd/tests/fio_fb/fio_fb.py with config fio_fb_perf.json failed: autoval.lib.utils.autoval_exceptions.ToolError: [AUTOVAL TOOL ERROR] Error in starting fio job. Reason: fio: failed parsing rwmixread=randrwMIX

2.fio_fb_perf.json random pattern have args RWMIX and RW 3./autoval_ssd/lib/utils/fio_runner.py create_fio_job ...... content = FileActions.read_data(templ_path) _size = "" for key, value in replace.items(): regex = re.compile(f"={key}", re.MULTILINE) content = re.sub(regex, f"={value}", content) will read random pattern tempalte job file:random_job.fio,and replace RW and RWMIX to real test value, when re.sub RW may replace RWMIX first, make RWMIX did not replace success 4.generated job file: [tcnsh@localhost 2024-07-29_16-52-47]$ cat 192.168.201.202_random_cycle_0_BLKSIZE256k_IODEPTH1_NUM_JOBS1_RUNTIME1200s_RWrandrw_RWMIX0.fio [global] rw=randrw rwmixread=randrwMIX // RW is wrong replace to randrw

log: output.log

aarthi-manivel commented 2 months ago

In template file, the RWMIX value is set to [0, 70, 100], which is invalid. The correct syntax for RWMIX is [read_percentage, write_percentage], where both values must add up to 100 and parsing the value as an array in control file causes issues and hence had set the values accordingly in template file.

The issue is fixed and a PR will be added shortly

aarthi-manivel commented 1 month ago

@kwzhu123 https://github.com/opencomputeproject/ocp-diag-autoval-ssd/commit/3a1bbd08432319b9e08238b7ca5ab3b426def082

Commit ID for reference.