Skip to content
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

Add RPC support and overhaul configuration system #41

Merged
merged 12 commits into from
Aug 13, 2024
Merged

Conversation

IsaacKhor
Copy link
Member

No description provided.

@IsaacKhor
Copy link
Member Author

IsaacKhor commented Aug 8, 2024

RPC support complete; I don't have time to document it, so if you want to add it that'll be great new docs at docs/configuration.md. Server can be run with the new binary lsvd_tgt. Usage:

$ export PYTHONPATH=path/to/directory/with/rpc_plugin.py
$ ./rpc.py --plugin rpc_plugin bdev_lsvd_create --help
usage: rpc.py [options] bdev_lsvd_create [-h] [-c CFG] pool_name name

positional arguments:
  pool_name          Name of the ceph pool
  name               Name of the lsvd disk image

options:
  -h, --help         show this help message and exit
  -c CFG, --cfg CFG  Path to config file OR inline JSON string

$ ./rpc.py --plugin rpc_plugin bdev_lsvd_delete --help
usage: rpc.py [options] bdev_lsvd_delete [-h] name

positional arguments:
  name        Name of the lsvd disk image

options:
  -h, --help  show this help message and exit

Also reading from config file is unimplemented so you can't actually use it yet, I'll add that in next. Implemented now but untested, so give it a spin first. Usage described in doc file and above.

@knikolla feel free to write unit tests for this, because this is actually isolated to just the config.cc file. I didn't have the time to do that.

@IsaacKhor IsaacKhor changed the title Add initial rpc support Add RPC support and overhaul configuration system Aug 8, 2024
@IsaacKhor
Copy link
Member Author

IsaacKhor commented Aug 8, 2024

Left TODO is debugging why spdk_json_decode_object is failing. Fixed.

@knikolla knikolla merged commit b3e7810 into main Aug 13, 2024
2 checks passed
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