]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
LIO: Let delete_initiator succeed if iqn not found
authorEric Harney <eharney@redhat.com>
Thu, 15 Oct 2015 14:25:49 +0000 (10:25 -0400)
committerEric Harney <eharney@redhat.com>
Mon, 19 Oct 2015 16:22:18 +0000 (12:22 -0400)
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

index 4714f4130d9181a248a353abfed23aee47828b78..65291180d316dfaf13f5110fb587a465206deb1e 100644 (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():