From fdcd66eaf9b23f72438016c86d80c504107b0dfb Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Thu, 15 Oct 2015 10:25:49 -0400 Subject: [PATCH] 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 --- cinder/cmd/rtstool.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cinder/cmd/rtstool.py b/cinder/cmd/rtstool.py index 4714f4130..65291180d 100644 --- a/cinder/cmd/rtstool.py +++ b/cinder/cmd/rtstool.py @@ -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(): -- 2.45.2