LIO: Let delete_initiator succeed if iqn not found

When performing delete_initiator, this should not
raise an error if it can't find the initiator in
an ACL.  This likely indicates something has
gotten out of sync, but the teardown should be
allowed to succeed.

Closes-Bug: #1506496
Change-Id: I3fa9d2e4a435de7c8ee5b24d419930050af197fe
This commit is contained in:
Eric Harney 2015-10-15 10:25:49 -04:00
parent ec98796767
commit fdcd66eaf9
1 changed files with 3 additions and 2 deletions

View File

@ -146,8 +146,9 @@ def delete_initiator(target_iqn, initiator_iqn):
if acl.node_wwn == initiator_iqn:
acl.delete()
return
raise RtstoolError(_('Could not find ACL %(acl)s in target %(target)s')
% {'target': target_iqn, 'acl': initiator_iqn})
print(_('delete_initiator: %s ACL not found. Continuing.') % initiator_iqn)
# Return successfully.
def get_targets():