Skip to contentSkip to conversation

- bug/break in setting a host on NVMe Target?

nvmet/nvmetcli J Freyensee 3 participants 4 messages Mar 4, 2017 – Mar 28, 2017 NVMe

lore
Share & tools
lore
#0 lore raw

Christoph,

I think something might have broke being able to use nvmetcli to set up a host nqn name interactively?

Just following a simple example with mainline 4.10 kernel (tag - v4.10):

[stg at localhost nvmetcli]$ sudo ./nvmetcli?
/> cd /hosts
/hosts> create hostnqn
'module' object has no attribute 'Host'
/hosts>?

but if I hand-write the equivalent JSON file and load the target with that there seems to be no issue:

[stg at localhost nvmetcli]$ sudo cat test.json?
{
? "hosts": [

? {
	"nqn": "hostnqn"

? }
? ],?
? "ports": [],?
? "subsystems": [
????{
????}
? ]
}

[stg at localhost nvmetcli]$ sudo ./nvmetcli restore test.json? [stg at localhost nvmetcli]$ sudo ./nvmetcli?
/hosts> ls
o- hosts ................................................................. [...]
? o- hostnqn ............................................................. [...]
/hosts>?

Setting up a subsystem interactively is no issue:
[stg at localhost nvmetcli]$ sudo ./nvmetcli clear
[stg at localhost nvmetcli]$ sudo ./nvmetcli
/hosts> ls
o- hosts ................................................................. [...]
/hosts> cd ../subsystems?
/subsystems> create testnqn
/subsystems> ls
o- subsystems ............................................................ [...]
? o- testnqn ............................................................. [...]
????o- allowed_hosts ..................................................... [...]
????o- namespaces ........................................................ [...]
/subsystems>?

I haven't figured what is causing the problem yet.

#1 lore raw
Quoted 5 lines · J Freyensee

Christoph,

I think something might have broke being able to use nvmetcli to set up a host
nqn name interactively?

Also seeing a similar issue for /ports, I didn't have a problem setting ports/ by hand-writing a .json file but ./nvmetcli is having a problem doing it interactively.