-
Notifications
You must be signed in to change notification settings - Fork 47
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
Conversation
@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 |
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.
I'd prefer this to be called spdk_socket
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.
As it is stated in the commit log message, I don't see much sens to use spdk_
prefix for parameters in [spdk]
section.
nvme_gw_server.py
Outdated
@@ -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") |
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.
Similar comment here & the rest of the places - spdk_rpc_socket or spdk_socket seems more appropriate to me
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.
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>
68de071
to
aaaa51d
Compare
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.
LGTM
@anitashekar I addressed one of your comments. Still for another (about naming the config param Do you agree with the current version or do you still prefer |
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