Target delete fails if target doesn't exist

Bug #1420010 reported by John Griffith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
John Griffith

Bug Description

There are cases seen in the Gate where a target delete is called an an exception is raised because the target does not exist. In the cinder target driver code we raise this as an ISCSITargetRemoveFailed exception, but if we're asking to delete the target and the target doesn't exist we can probably safely just log a warning that we expected the target, but didn't find it and move on calling the command successful.

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/154249

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

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

commit 19a31d33a4fa732eedc3a6c6c9a5956c70498779
Author: John Griffith <email address hidden>
Date: Mon Feb 9 14:45:40 2015 -0700

    Don't fail target_delete if target doesn't exist

    There are cases seen in the Gate where a target delete is
    called and an exception is raised because the target does
    not exist. In the cinder target driver code we raise this
    as an ISCSITargetRemoveFailed exception, but if we're asking
    to delete the target and the target doesn't exist we can
    probably safely move along.

    This patch adds a check for this specific case and logs a warning
    and continues rather than failing. We also add a unit test to
    check this case.

    Change-Id: I7021cafc9ee48bb8ad54433e4482ff1d61e865ae
    Closes-Bug: #1420010

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-3 → 2015.1.0
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.