Bug 430810 - isns discovery does not remove old records
Summary: isns discovery does not remove old records
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: iscsi-initiator-utils
Version: 5.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Mike Christie
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 457510
TreeView+ depends on / blocked
 
Reported: 2008-01-29 21:45 UTC by Mike Christie
Modified: 2012-06-27 09:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-27 09:27:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike Christie 2008-01-29 21:45:46 UTC
Description of problem:


If I remove a target on the isns sever, then rerun discovery with iscsiadm the
record for the target that was removed is not deleted.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Record for deleted target should be removed.


Additional info:

Comment 1 Fred Wittekind IV 2008-07-30 13:45:53 UTC
Excerpt from strace of iscsiadm:

unlink("/var/lib/iscsi/send_targets/10.4.10.55,3260/iqn.2003-10.com.lefthandnetworks:lhsan:28:www-root,10.4.10.55,3260,1,default")
= -1 EISDIR (Is a directory)
write(2, "iscsiadm: ", 10)              = 10
write(2, "Could not remove link /var/lib/i"..., 147) = 147

Note, this particular iscsi target was one that was scanned at install time by
anaconda, ones scanned via iscsiadm command later appear to be symlinks in the
same directory (as iscsiadm appears to expect). 

Comment 2 Mike Christie 2008-07-31 16:46:39 UTC
Hi,

I am not sure what you are reporting on here. This bugzilla was just for isns
discovery, because the removal feature was not implemented.

Are you having trouble with just targets/portals found with send targets
discovery? What is the exact problem? As far as symlink vs dir goes, it should
be ok, because iscsiadm supports both layouts. Is iscsiadm failing and logging
something about this?

You can also run iscsiadm ..... -d 8 to get lots of debug info.

Let me know what is wrong, and run iscsiadm with -d 8 and I can help more.

Comment 3 Fred Wittekind IV 2008-07-31 17:40:04 UTC
The original notes on the bug report talk about rerunning discovery with
iscsiadm, and a target that was removed not being deleted.  Looked to be the
exact same issue that was happening for me, thus the additional information was
related, and may help to nail down where the bug actually is.

# iscsiadm -m discovery -t st -p 10.4.10.55:3260
iscsiadm: Could not remove link
/var/lib/iscsi/send_targets/10.4.10.55,3260/iqn.2003-10.com.lefthandnetworks:lhsan:28:www-root,10.0.30.7,3260,1,default
err 21
iscsiadm: Could not delete node
/var/lib/iscsi/nodes/iqn.2003-10.com.lefthandnetworks:lhsan:28:www-root/10.4.10.55,3260/default

Comment 4 Mike Christie 2008-08-01 09:05:56 UTC
(In reply to comment #3)
> The original notes on the bug report talk about rerunning discovery with
> iscsiadm, and a target that was removed not being deleted.  Looked to be the
> exact same issue that was happening for me, thus the additional information was
> related, and may help to nail down where the bug actually is.

Ah I see, it was my fault. I did not describe the problem right in the original
bugzilla comment. This bugzilla is just for isns discvoery not removing targets
correctly. For isns, we did not implement this feature at all, so if the isns
server told us about targetA and targetB, then only tells us about TargetA, the
initiator's isns discovery code just leaves targetB on purpose.

For what you hit below it looks like a bug in the sendtargets code where we did
try to handle the case where sendtargets returns different targets.

Let me make a new bugzilla for your issue.



> 
> # iscsiadm -m discovery -t st -p 10.4.10.55:3260
> iscsiadm: Could not remove link
>
/var/lib/iscsi/send_targets/10.4.10.55,3260/iqn.2003-10.com.lefthandnetworks:lhsan:28:www-root,10.0.30.7,3260,1,default
> err 21
> iscsiadm: Could not delete node
>
/var/lib/iscsi/nodes/iqn.2003-10.com.lefthandnetworks:lhsan:28:www-root/10.4.10.55,3260/default




Note You need to log in before you can comment on or make changes to this bug.