Skip to content

Chore: Add the clientname option for fio and librbdfio#335

Open
rfakit wants to merge 6 commits intoceph:masterfrom
rfakit:master
Open

Chore: Add the clientname option for fio and librbdfio#335
rfakit wants to merge 6 commits intoceph:masterfrom
rfakit:master

Conversation

@rfakit
Copy link
Copy Markdown

@rfakit rfakit commented May 30, 2025

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

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

@lee-j-sanders
Copy link
Copy Markdown
Member

@rfakit thank you for the contribution, looks like a useful addition.

Please note the automatic unit test generator here:
https://github.com/ceph/cbt/blob/master/docs/AutomaticUnitTestGeneration.md

Adding an additional option to the YAML requires changes to the unit tests, please can you add the appropriate unit tests for this. See the documentation above on how to use this.

Either @harriscr or myself are happy to review thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants