LIO: don't fail delete_initiator if iqn not found

Bug #1506496 reported by Eric Harney
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Eric Harney

Bug Description

If the initiator ACL has already been removed when tearing down an LIO export (due to something in Cinder getting out of sync, or it being removed externally), allow teardown to succeed rather than failing because a matching ACL can't be found.

This appears as:

ERROR cinder.volume.targets.lio Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf cinder-rtstool delete-initiator iqn.2010-10.org.openstack:volume-d8
bfefa9-460f-4bb4-b0e0-852f0542fd72 iqn.1994-05.com.redhat:test31
ERROR cinder.volume.targets.lio Exit code: 1
ERROR cinder.volume.targets.lio Stdout: u''
ERROR cinder.volume.targets.lio Stderr: u'Traceback (most recent call last):\n
  File "/bin/cinder-rtstool", line 10, in <module>\n
    sys.exit(main())\n
 File "/usr/lib/python2.7/site-packages/cinder/cmd/rtstool.py", line 291, in main\n
    delete_initiator(target_iqn, initiator_iqn)\n
  File "/usr/lib/python2.7/site-packages/cinder/cmd/rtstool.py", line 142, in delete_initiator\n
    target = _lookup_target(target_iqn, initiator_iqn)\n
  File "/usr/lib/python2.7/site-packages/cinder/cmd/rtstool.py", line 122, in _lookup_target\n
    raise RtstoolError(_(\'Could not find target %s\') % target_iqn)\ncinder.cmd.rtstool.RtstoolError\n'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/235401

Changed in cinder:
assignee: nobody → Eric Harney (eharney)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/235401
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=fdcd66eaf9b23f72438016c86d80c504107b0dfb
Submitter: Jenkins
Branch: master

commit fdcd66eaf9b23f72438016c86d80c504107b0dfb
Author: Eric Harney <email address hidden>
Date: Thu Oct 15 10:25:49 2015 -0400

    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

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/cinder 8.0.0.0b1

This issue was fixed in the openstack/cinder 8.0.0.0b1 development milestone.

Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.