-
Notifications
You must be signed in to change notification settings - Fork 46
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
Initial commit for the NVMeoF gateway to Ceph management daemon #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, it has been decided to use gRPC for client side communication instead of REST API?
I seemed to miss this discussion. Could you please tell about the reason? I suppose the REST API would be much easier for integration with third parties and users would like it more.
And I see that the current version of CLI just mimics the commands of nvmf_tgt
. I was thinking it would provide a more abstract interface so it would be possible to manage all gateways in the group, not only one gateway. Though I guess it is going to be changed in the future?
And note, my comments are not objection for merging it. It is more for discussion. At the current project stage I would prefer a flow when we merge quickly, leaving the bits that need more discussion for further PRs.
Thank you for reviewing the PR, Mykola. We had a discussion at the start of the project and based on that: Why gRPC:
And yes, the roadmap set a single gateway configuration as the 1st step and that's what you see reflected in the CLI. This will be changed in the future so that the CLI will talk to all gateways in the gateway group Here is the etherpad that has some history of the discussions we have been having and the design choices based on the discussions. It will be great to see you at the bluejeans meetings on Tuesdays at 11AM US Central time for ongoing discussions. https://pad.ceph.com/p/rbd_nvmeof |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM (Reviewed by: Mykola Golub mykola.golub@clyso.com)
I am still not very happy about the decision to use gRPC instead of REST API, but this should not be a stopper for this PR to be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple notes after trying this.
Please squash "addressed review" commits into the initial commit and add a Signed-off-by. |
README.md
Outdated
gateway_addr = <IP address at which the client can reach the gateway> | ||
gateway_port = <port at which the client can reach the gateway> | ||
|
||
2. To [enable mTLS](#mtls-configuration-for-testing-purposes) using self signed certificates, edit the config file to set: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: numbering is off here. I know it doesn't matter for rendering but some people use plain text editors ;)
README.md
Outdated
|
||
spdk_path = <complete path to SPDK parent directory> | ||
spdk_tgt = <relative path to SPDK target executable> | ||
5. Setup SPDK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add an empty line above
README.md
Outdated
|
||
This daemon runs as root. It provides the ability to export existing RBD images as NVMeoF namespaces. Creation of RBD images is not within the scope of this daemon. | ||
|
||
# Initial configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Initial configuration: | |
# Initial configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, in Ilya's suggested change it is without the colon symbol.
README.md
Outdated
|
||
# CLI Usage | ||
|
||
The CLI code can be used to initiate a connection to the gateway and run commands to configure the NVMe targets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CLI code can be used to initiate a connection to the gateway and run commands to configure the NVMe targets. | |
The CLI tool can be used to initiate a connection to the gateway and run commands to configure the NVMe targets. |
README.md
Outdated
|
||
The CLI code can be used to initiate a connection to the gateway and run commands to configure the NVMe targets. | ||
|
||
Run the code with the -h flag to see a list of available commands: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run the code with the -h flag to see a list of available commands: | |
Run the tool with the -h flag to see a list of available commands: |
nvme_gw_cli.py
Outdated
@cli.cmd([ | ||
argument("-i", "--image", help="RBD image name", required=True), | ||
argument("-p", "--pool", help="Ceph pool name", required=True), | ||
argument("-b", "--bdev_name", help="Bdev name"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to be consistent with create_namespace
argument("-b", "--bdev_name", help="Bdev name"), | |
argument("-b", "--bdev", help="Bdev name"), |
nvme_gw_server.py
Outdated
# cmd = [spdk_cmd] | ||
# cmd += ["all"] | ||
# cmd += ["-u"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# cmd = [spdk_cmd] | |
# cmd += ["all"] | |
# cmd += ["-u"] |
nvme_gw_server.py
Outdated
import subprocess | ||
import grpc | ||
from concurrent import futures | ||
from distutils import util |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused import
README.md
Outdated
|
||
enable_auth = True # Setting this to False will open an insecure port | ||
|
||
3. Compiling protobuf files for grpc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Compiling protobuf files for grpc: | |
3. Compile protobuf files for gRPC: |
README.md
Outdated
|
||
$ ./scripts/pkgdep.sh | ||
|
||
Intialize configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intialize configuration: | |
Initialize configuration: |
README.md
Outdated
|
||
$ python3 nvme_gw_server.py | ||
INFO:root:SPDK PATH: /path/to/spdk | ||
INFO:root:Starting /path.to/spdk/tgt/nvmf_tgt all -u |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INFO:root:Starting /path.to/spdk/tgt/nvmf_tgt all -u | |
INFO:root:Starting /path/to/spdk/tgt/nvmf_tgt all -u |
Note that there are few unresolved nits from the previous review -- GitHub unhelpfully hides them under "X hidden conversations". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And as I understand not all Ilya's comments are addressed yet?
README.md
Outdated
|
||
This daemon runs as root. It provides the ability to export existing RBD images as NVMeoF namespaces. Creation of RBD images is not within the scope of this daemon. | ||
|
||
# Initial configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, in Ilya's suggested change it is without the colon symbol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM. When you address these and squash I am going to merge it.
This daemon sets up access to Ceph storage over NVMeoF Signed-off-by: Anita Shekar <anita.shekar@ibm.com>
No description provided.