Hi experts,
Our team find two bugs, please help me check whether they are valid, if
they are, I am happy to fix them:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(A) If we touch a empty default file in sendtargets, when we try to
discover the targets, we would got a empty default file in sendtargets.
Here is the detailed information and how to reproduce.
(1) we have a target on 147.2.207.131. Target name: iqn.2015-07.com.example
(2) Create a folder like
"/etc/iscsi/send_targets/147.2.207.131,3260/iqn.2015-07.com.example,147.2.207.131,3260,1,default"
which matches the target name, here it is iqn.2015-07.com.example
linux-askc:/etc/iscsi # mkdir -p
/etc/iscsi/send_targets/147.2.207.131,3260/iqn.2015-07.com.example,147.2.207.131,3260,1,default
(3) Create a empty default file in the folder created above.
linux-askc:/etc/iscsi # touch
/etc/iscsi/send_targets/147.2.207.131,3260/iqn.2015-07.com.example,147.2.207.131,3260,1,default/default
(4) Run discover command,
linux-askc:/etc/iscsi # iscsiadm -m discovery -t st -p 147.2.207.131
147.2.207.131:3260,1 iqn.2015-07.com.example (we got the target)
(5) check the default file in sendtargets:
linux-askc:/etc/iscsi # cat
/etc/iscsi/send_targets/147.2.207.131,3260/iqn.2015-07.com.example,147.2.207.131,3260,1,default/default
Then we will find the default file :
/etc/iscsi/send_targets/147.2.207.131,3260/iqn.2015-07.com.example,147.2.207.131,3260,1,default/default
still a empty
(6) If we want to delete the target, we would see:
linux-askc:/etc/iscsi/nodes # iscsiadm -m node -o delete
iscsiadm: Could not remove link
/etc/iscsi/send_targets/147.2.207.131,3260/iqn.2015-07.com.example,147.2.207.131,3260,1,default:
Is a directory
iscsiadm: Could not execute operation on all records: encountered iSCSI
database failure
(7) Then run discover command again, we would get a error:
linux-askc:/etc/iscsi # iscsiadm -m discovery -t st -p 147.2.207.131
iscsiadm: Could not remove link
/etc/iscsi/send_targets/147.2.207.131,3260/iqn.2015-07.com.example,147.2.207.131,3260,1,default:
Is a directory
iscsiadm: Could not add/update [tcp:[hw=,ip=,net_if=,iscsi_if=default]
147.2.207.131,3260,1 iqn.2015-07.com.example]
147.2.207.131:3260,1 iqn.2015-07.com.example
linux-askc:/etc/iscsi #
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(B) If we touch a empty default file in nodes when we try to discover the
targets,
(1) we have a target on 147.2.207.131. Target name: iqn.2015-07.com.example
(2) Create a folder like
"/etc/iscsi/nodes/iqn.2015-07.com.example/147.2.207.131,3260,1" which
matches the target name, here it is iqn.2015-07.com.example
mkdir -p /etc/iscsi/nodes/iqn.2015-07.com.example/147.2.207.131,3260,1
(3) Create a empty default file in the folder created above.
linux-askc:/etc/iscsi # touch
/etc/iscsi/nodes/iqn.2015-07.com.example/147.2.207.131,3260,1/default
(4) Run discover command, we will see a error:
linux-askc:/etc/iscsi # iscsiadm -m discovery -t st -p 147.2.207.131
iscsiadm: Could not stat /etc/iscsi/nodes//,3260,-1/default to delete node:
No such file or directory
iscsiadm: Could not add/update [tcp:[hw=,ip=,net_if=,iscsi_if=default]
147.2.207.131,3260,1 iqn.2015-07.com.example]
147.2.207.131:3260,1 iqn.2015-07.com.example
linux-askc:/etc/iscsi #
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For now, the only way we know that can 100% trigger the bug is creating
these files manually, but some guys had ever see the bugs randomly. Are
they valid bugs? I think it is nice to enhance the code.
Thanks,
BR
Zhu Lingshan
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.