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

Initial commit for the NVMeoF gateway to Ceph management daemon #3

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

anitashekar
Copy link
Contributor

No description provided.

Copy link
Contributor

@trociny trociny left a 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.

proto/nvme_gw.proto Show resolved Hide resolved
nvme_gw_server.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@anitashekar
Copy link
Contributor Author

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:

  • gRPC is attractive because it enforces strong versioning which will make it safer to make changes in the API in the future without accidentally causing unforeseen results
  • It is more performant. That may not be a huge impact initially, but will help when we scale up

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
https://pad.ceph.com/p/rbd_nvmeof_management_layer

Copy link
Contributor

@trociny trociny left a 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.

nvme_gw_cli.py Outdated Show resolved Hide resolved
nvme_gw_cli.py Outdated Show resolved Hide resolved
nvme_gw_cli.py Outdated Show resolved Hide resolved
nvme_gw_server.py Outdated Show resolved Hide resolved
Copy link
Contributor

@trociny trociny left a 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.

nvme_gw.config Outdated Show resolved Hide resolved
nvme_gw.config Outdated Show resolved Hide resolved
nvme_gw.config Outdated Show resolved Hide resolved
COPYING Outdated Show resolved Hide resolved
nvme_gw_config.py Show resolved Hide resolved
nvme_gw_cli.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
COPYING Outdated Show resolved Hide resolved
nvme_gw_server.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@idryomov
Copy link
Contributor

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:
Copy link
Contributor

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
Copy link
Contributor

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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Initial configuration:
# Initial configuration

Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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"),
Copy link
Contributor

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

Suggested change
argument("-b", "--bdev_name", help="Bdev name"),
argument("-b", "--bdev", help="Bdev name"),

Comment on lines 39 to 41
# cmd = [spdk_cmd]
# cmd += ["all"]
# cmd += ["-u"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# cmd = [spdk_cmd]
# cmd += ["all"]
# cmd += ["-u"]

import subprocess
import grpc
from concurrent import futures
from distutils import util
Copy link
Contributor

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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Compiling protobuf files for grpc:
3. Compile protobuf files for gRPC:

README.md Outdated

$ ./scripts/pkgdep.sh

Intialize configuration:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
INFO:root:Starting /path.to/spdk/tgt/nvmf_tgt all -u
INFO:root:Starting /path/to/spdk/tgt/nvmf_tgt all -u

@idryomov
Copy link
Contributor

Note that there are few unresolved nits from the previous review -- GitHub unhelpfully hides them under "X hidden conversations".

Copy link
Contributor

@trociny trociny left a 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:
Copy link
Contributor

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.

Copy link
Contributor

@trociny trociny left a 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.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
This daemon sets up access to Ceph storage over NVMeoF

Signed-off-by: Anita Shekar <anita.shekar@ibm.com>
@trociny trociny merged commit a3f8d5a into ceph:devel Nov 3, 2021
@epuertat epuertat added this to the Milestone 1 milestone Nov 18, 2022
barakda pushed a commit to barakda/ceph-nvmeof that referenced this pull request Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants