cbt icon indicating copy to clipboard operation
cbt copied to clipboard

Chore: Add the clientname option for fio and librbdfio

Open rfakit opened this issue 8 months ago • 0 comments

Add clientname option for fio and librbdfio benchmarks

Description

This PR adds a configurable clientname option to both the fio and librbdfio benchmark classes in CBT. This enhancement allows users to specify a custom client name when running FIO benchmarks against RBD endpoints, rather than being limited to the hardcoded 'admin' client name.

Changes

  • Added clientname configuration option to Fio class with a default value of 'admin'
  • Added clientname configuration option to LibrbdFio class with a default value of 'admin'
  • Updated FIO command construction to use the configured clientname in both classes
  • Modified prefill command in LibrbdFio to use the configured clientname

Testing

The changes have been tested with:

  • Default configuration (clientname = 'admin')
  • Custom clientname configuration
  • Both fio and librbdfio benchmark types
  • Various RBD endpoint configurations

Usage Example

benchmarks:
  librbdfio:
    clientname: 'custom_client'  # Optional, defaults to 'admin'
    time: 300
    vol_size: 16384
    mode: [read, write]
    # ... other configuration options ...

Impact

This change is backward compatible as it maintains the default 'admin' clientname if not specified in the configuration. Users who don't specify a clientname will see no change in behavior.

Related Issues

N/A

Checklist

  • [x] Code follows the project's coding style
  • [ ] Documentation has been updated (if applicable)
  • [ ] Tests have been added/updated (if applicable)
  • [ ] All tests pass
  • [x] Changes are backward compatible

rfakit avatar May 30 '25 15:05 rfakit