ceph / ceph/ceph-nvmeof

Unable to add host to nqn following example in README

Open
#45 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
132
Forks
69
Avg merge
1d 7h
Merged PRs (30d)
47

Description

Trying to follow the examples in the README. the steps to create a bdev, create a subsystemd and adding a namespace all succeed. But trying to add a host does result in an error:

```
~/ceph-nvmeof# python3 -m control.cli add_host -n nqn.2016-06.io.spdk:cnode1 -t *
usage: python3 -m control.cli [-h] [-c CONFIG]
{create_bdev,delete_bdev,create_subsystem,delete_subsystem,add_namespace,remove_namespace,add_host,remove_host,create_listener,delete_listener,get_subsystems}
...
python3 -m control.cli: error: unrecognized arguments: control COPYING LICENSE Makefile proto README.md requirements.txt spdk tests
```
I generated a nqn for the host:
```
nvme gen-hostnqn > /etc/nvme/hostnqn
```
And used that nqn:
```
cat /etc/nvme/hostnqn
nqn.2014-08.org.nvmexpress:uuid:07ac0178-d457-415d-8ba8-bef911e64b88

~/ceph-nvmeof# python3 -m control.cli add_host -n nqn.2016-06.io.spdk:cnode1 -t nqn.2014-08.org.nvmexpress:uuid:07ac0178-d457-415d-8ba8-bef911e64b88
INFO:__main__:Added host nqn.2014-08.org.nvmexpress:uuid:07ac0178-d457-415d-8ba8-bef911e64b88 access to nqn.2016-06.io.spdk:cnode1: True

~/ceph-nvmeof# python3 -m control.cli create_listener -n nqn.2016-06.io.spdk:cnode1 -s 5001
INFO:__main__:Created nqn.2016-06.io.spdk:cnode1 listener: True

```
I manually tried to allow access to all host by using `rpc.py` from spdk scripts directly, and it worked. Somehow the "*" argument does not seem to work anymore.

Contributor guide

Open the contributing guide

Research direction

Start with the add_host example in README and the add_host entry point in control.cli; inspect how the host argument is parsed and passed to the SPDK rpc.py tooling. Reproduce the command with the wildcard and with the generated host NQN, then verify that wildcard host access is accepted without unintended arguments from the shell.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.