commit fd38f1d7b7a8d7f09b40dae1190d5a7330bd18d6
Author: Walter A. Boring IV <email address hidden>
Date: Wed Aug 12 14:00:54 2015 -0700
Don't return Exception when volume is detached
This patch changes the way we handle volume detach
attempts when the attachment_id is already detached
and/or when the volume has no attachments. We now
handle this the same way we do with deleting volumes
that don't exist. We return success.
This patch also takes care to make sure we safely reset
the volume status to what it should be depending on if
there are other attachments. If the attachment_id is
passed in and that attachment is detached, but there are
other attachments, we want to make sure that the volume is
left in an in-use state, not available.
NOTE(mriedem): The conflicts are due to commit
386e2858a4e76fafc1d78737154859a3c1618b20 not being in stable/kilo
and I don't plan on backporting that since it's based on the level
of oslo.log used in Liberty. This does mean the info messages in
the detach_volume method in the volume manager are not exactly
the same as what is in the original change in Liberty. Rather than
using the resource=volume kwarg, we just log the volume_id like the
error messages were before this change.
Reviewed: https:/ /review. openstack. org/213761 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=fd38f1d7b7a 8d7f09b40dae119 0d5a7330bd18d6
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit fd38f1d7b7a8d7f 09b40dae1190d5a 7330bd18d6
Author: Walter A. Boring IV <email address hidden>
Date: Wed Aug 12 14:00:54 2015 -0700
Don't return Exception when volume is detached
This patch changes the way we handle volume detach
attempts when the attachment_id is already detached
and/or when the volume has no attachments. We now
handle this the same way we do with deleting volumes
that don't exist. We return success.
This patch also takes care to make sure we safely reset
the volume status to what it should be depending on if
there are other attachments. If the attachment_id is
passed in and that attachment is detached, but there are
other attachments, we want to make sure that the volume is
left in an in-use state, not available.
Conflicts:
cinder/ tests/test_ volume. py
cinder/ volume/ manager. py
NOTE(mriedem): The conflicts are due to commit 76fafc1d7873715 4859a3c1618b20 not being in stable/kilo
386e2858a4e
and I don't plan on backporting that since it's based on the level
of oslo.log used in Liberty. This does mean the info messages in
the detach_volume method in the volume manager are not exactly
the same as what is in the original change in Liberty. Rather than
using the resource=volume kwarg, we just log the volume_id like the
error messages were before this change.
Change-Id: I11b7c45bb6570c e11e13e487cf113 6ca2551036b c3e1a5c071eb38c 7d5cb9a239)
Closes-Bug: #1484194
Related-Bug: #1476806
(cherry picked from commit 3b4e8c31a2c94ca