open-iscsi / rtslib-fb

Python library for configuring the Linux kernel-based multiprotocol SCSI target (LIO)
Apache License 2.0
72 stars 90 forks source link

The automatic generation of target wwn fails with underscore in hostname #135

Closed linonymous closed 6 years ago

linonymous commented 6 years ago

The auto-generation of target name fails with hostname having an underscore.

[root@iron_man ~]# [root@iron_man ~]# targetcli /iscsi create Created target iqn.2003-01.org.linux-iscsi.iron_man.x8664:sn.d93914fac7d4. Created TPG 1. Global pref auto_add_default_portal=true Created default portal listening on all IPs (0.0.0.0), port 3260. [root@iron_man ~]# [root@iron_man ~]# targetcli ls WWN not valid as: iqn, naa, eui [root@iron_man ~]# [root@iron_man ~]# [root@iron_man ~]# ls /sys/kernel/config/target/iscsi/ discovery_auth lio_version iqn.2003-01.org.linux-iscsi.iron_man.x8664:sn.d93914fac7d4 [root@iron_man ~]#

This pull request is for removing underscore in localhost name.

linonymous commented 6 years ago

And because of this, I am not able to do anything with targetcli. As everytime targetcli initiates, it checks the target name and breaks. Is there any way out of this loop?

I tried deleting the directory from configfs but it didn't work.