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

nvme_gw_server: allow to change rpc socket address #4

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

trociny
Copy link
Contributor

@trociny trociny commented Nov 7, 2021

Previously it was supposed that you could change the address by using
spdk_server_addr and spdk_port configuration parameters. But the
parameters were used only by rcp client, while the spdk target was
always started with the default socket address. This commit fixes it.

Additionally, there is no sense to provide the port configuration
option because the target is always listening on a unix socket
only. So the two parameters spdk_server_addr and spdk_port are
replaced with one rpc_socket. There is not much sense to add "spdk_"
prefix to the option name, because it is in [spdk] section.

And while here remove unused "all" argument in nvme_tgt command, which
seemed to be unintentionally committed after testing with "-L all".

Signed-off-by: Mykola Golub mykola.golub@clyso.com

@trociny
Copy link
Contributor Author

trociny commented Nov 7, 2021

@anitashekar @PepperJo please review

@@ -25,8 +25,7 @@ client_cert = ./client.crt

[spdk]

spdk_server_addr = /var/tmp/spdk.sock
spdk_port = 5260
rpc_socket = /var/tmp/spdk.sock
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer this to be called spdk_socket

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As it is stated in the commit log message, I don't see much sens to use spdk_ prefix for parameters in [spdk] section.

@@ -35,8 +35,9 @@ def start_spdk(self):
self.spdk_rpc = spdk_rpc
spdk_tgt = self.nvme_config.get("config", "spdk_tgt")
spdk_cmd = os.path.join(spdk_path, spdk_tgt)
rpc_socket = self.nvme_config.get("spdk", "rpc_socket")
Copy link
Contributor

@anitashekar anitashekar Nov 8, 2021

Choose a reason for hiding this comment

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

Similar comment here & the rest of the places - spdk_rpc_socket or spdk_socket seems more appropriate to me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok about this.

Previously it was supposed that you could change the address by using
spdk_server_addr and spdk_port configuration parameters. But the
parameters were used only by rcp client, while the spdk target was
always started with the default socket address. This commit fixes it.

Additionally, there is no sense to provide the port configuration
option because the target is always listening on a unix socket
only. So the two parameters spdk_server_addr and spdk_port are
replaced with one rpc_socket. There is not much sense to add "spdk_"
prefix to the option name, because it is in [spdk] section.

And while here remove unused "all" argument in nvme_tgt command, which
seemed to be unintentionally committed after testing with "-L all".

Signed-off-by: Mykola Golub <mykola.golub@clyso.com>
Copy link

@PepperJo PepperJo left a comment

Choose a reason for hiding this comment

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

LGTM

@trociny
Copy link
Contributor Author

trociny commented Nov 30, 2021

@anitashekar I addressed one of your comments. Still for another (about naming the config param spdk_socket) I'd rather not do this due to the reason I provided in the response.

Do you agree with the current version or do you still prefer spdk_socket (then I would like to learn more why)?

@trociny trociny merged commit 29323b5 into ceph:devel Dec 1, 2021
@trociny trociny deleted the wip-rpc_socket branch December 1, 2021 16:35
@epuertat epuertat added this to the Milestone 1 milestone Nov 18, 2022
barakda added a commit to barakda/ceph-nvmeof that referenced this pull request Feb 19, 2024
barakda added a commit to barakda/ceph-nvmeof that referenced this pull request Feb 19, 2024
barakda added 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.

4 participants