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

Unable to provide multiple parameters with tgt_cmd_extra_args #232

Closed
pcuzner opened this issue Sep 13, 2023 · 4 comments
Closed

Unable to provide multiple parameters with tgt_cmd_extra_args #232

pcuzner opened this issue Sep 13, 2023 · 4 comments
Assignees

Comments

@pcuzner
Copy link
Contributor

pcuzner commented Sep 13, 2023

Using a single override works fine, but when I attempt to use something like

tgt_cmd_extra_args = "--cpumask=0xFF --msg-mempool-size=524288"

The gateway fails to start since it passes the same parameters to the start of nvmf

 INFO:control.server:Starting /usr/local/bin/nvmf_tgt -u -r /var/tmp/spdk.sock --cpumask=0xFF --msg-mempool-size=524288
 INFO:control.server:Attempting to initialize SPDK: rpc_socket: /var/tmp/spdk.sock, conn_retries: 300, timeout: 60.0
 INFO: Setting log level to WARN
 INFO:JSONRPCClient(/var/tmp/spdk.sock):Setting log level to WARN
 [2023-09-13 04:58:10.051690] Starting SPDK v23.01.1 / DPDK 22.11.1 initialization...
 [2023-09-13 04:58:10.051765] [ DPDK EAL parameters: nvmf --no-shconf -c 0xFF --msg-mempool-size=524288 --no-pci --huge-unlink --log-level=lib.eal:6 --log-level=lib.cryptodev:5 --log-level=user1:6 --iova-mode=pa --base-virtaddr=0x2000000>
 EAL: invalid characters in coremask: [ 0xFF --msg-mempool-size=524288]
 EAL: invalid coremask syntax

@caroav
Copy link
Collaborator

caroav commented Sep 13, 2023

@gbregman please have a look

@gbregman
Copy link
Contributor

gbregman commented Sep 13, 2023

The problem here is the usage of quotes in the conf file. As the string used was:

tgt_cmd_extra_args = "--cpumask=0xFF --msg-mempool-size=524288"

The two arguments were passed as a single argument to SPDK. The SPDK command line parser tries to parse the "--cpumask" argument and get:

ceph-nvmeof-nvmeof-1 | EAL: invalid characters in coremask: [ 0xFF --msg-mempool-size=524288] ceph-nvmeof-nvmeof-1 | EAL: invalid coremask syntax ceph-nvmeof-nvmeof-1 | EAL: FATAL: Invalid 'command line' arguments. ceph-nvmeof-nvmeof-1 | EAL: Invalid 'command line' arguments.

When I remove the quotes and used this line in the conf file:

tgt_cmd_extra_args = --cpumask=0xFF --msg-mempool-size=524288

I don't get this error. I still get an error but it's about the actual core mask being invalid:

ceph-nvmeof-nvmeof-1 | [2023-09-13 13:18:25.365223] [ DPDK EAL parameters: nvmf --no-shconf -c 0xFF --no-pci --huge-unlink --log-level=lib.eal:6 --log-level=lib.cryptodev:5 --log-level=user1:6 --iova-mode=pa --base-virtaddr=0x200000000000 --match-allocations --file-prefix=spdk_pid7 ] ceph-nvmeof-nvmeof-1 | EAL: lcore 4 unavailable ceph-nvmeof-nvmeof-1 | EAL: lcore 5 unavailable ceph-nvmeof-nvmeof-1 | EAL: lcore 6 unavailable ceph-nvmeof-nvmeof-1 | EAL: lcore 7 unavailable ceph-nvmeof-nvmeof-1 | EAL: invalid coremask, please check specified cores are part of 0-3 ceph-nvmeof-nvmeof-1 | EAL: FATAL: Invalid 'command line' arguments. ceph-nvmeof-nvmeof-1 | EAL: Invalid 'command line' arguments. ceph-nvmeof-nvmeof-1 | [2023-09-13 13:18:25.373935] init.c: 602:spdk_env_init: *ERROR*: Failed to initialize DPDK

When I changed the mask value to 0x03 using the line:

tgt_cmd_extra_args = --cpumask=0x03 --msg-mempool-size=524288

In the conf file, SPDK went up with no problem.

@rkachach
Copy link

rkachach commented Sep 13, 2023

@pcuzner @gbregman I remember having to introduce some tricky change to generate the double quotes correctly when generating the daemon config file in cephadm, I understand this not needed anymore right?

@pcuzner
Copy link
Contributor Author

pcuzner commented Sep 13, 2023

Thanks @gbregman. I've confirmed that without the quotes I can use a cpumask upto the number of cores on a socket.

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

No branches or pull requests

4 participants