From: Eric Harney Date: Thu, 15 Oct 2015 14:25:49 +0000 (-0400) Subject: LIO: Let delete_initiator succeed if iqn not found X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=fdcd66eaf9b23f72438016c86d80c504107b0dfb;p=openstack-build%2Fcinder-build.git 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 --- 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():