We shouldn't allow update of attachment records on volumes in error state

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

Bug Description

Currently we don't do any sort of status checks when updating Attachment objects on a Volume. This may or may not be "ok", we might want to consider adding a check at the API layer to reject calls to update attachments in the new Attachment API's if a volume is in an error state.

Note that since the reserve action was added as a requirement for the new Attachment API, we do call reserve on newly created attachments, so we're "ok" in terms of creating a new attachment, just need to check out the update.

Changed in cinder:
assignee: nobody → John Griffith (john-griffith)
Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → Medium
description: updated
summary: - We shouldn't allow create/update of attachment records on volumes in
- error state
+ We shouldn't allow update of attachment records on volumes in error
+ state
Changed in cinder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/620977
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=7d7dc2659d1ad07ef77892306827ca4a662e315d
Submitter: Zuul
Branch: master

commit 7d7dc2659d1ad07ef77892306827ca4a662e315d
Author: j-griffith <email address hidden>
Date: Thu Nov 29 18:07:58 2018 +0000

    Check Volume Status on attahcment create/update

    Currently the new Attachment calls in Cinder aren't checking the status
    of the volume when create or update is called. This isn't good because
    it can mask problems with attach processes on the volume.

    This patch adds an explicit check of the volume status in both
    attachment_create and attachment_update, and if the volume status is in
    any error state, the call will result in an InvalidVolume exception.

    This is an API change to fix a bug, and is not microversioned.

    Closes-Bug: #1805762

    Change-Id: I9b32c4db93879dda6490b244643de1a18bddbbf5

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 14.0.0.0rc1

This issue was fixed in the openstack/cinder 14.0.0.0rc1 release candidate.

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

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/646043

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/647974

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/rocky)

Reviewed: https://review.openstack.org/646043
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=b9a9492baca004494dd099e2e2d0180cc8483b28
Submitter: Zuul
Branch: stable/rocky

commit b9a9492baca004494dd099e2e2d0180cc8483b28
Author: j-griffith <email address hidden>
Date: Thu Nov 29 18:07:58 2018 +0000

    Check Volume Status on attahcment create/update

    Currently the new Attachment calls in Cinder aren't checking the status
    of the volume when create or update is called. This isn't good because
    it can mask problems with attach processes on the volume.

    This patch adds an explicit check of the volume status in both
    attachment_create and attachment_update, and if the volume status is in
    any error state, the call will result in an InvalidVolume exception.

    This is an API change to fix a bug, and is not microversioned.

    Closes-Bug: #1805762

    Change-Id: I9b32c4db93879dda6490b244643de1a18bddbbf5
    (cherry picked from commit 7d7dc2659d1ad07ef77892306827ca4a662e315d)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/queens)

Reviewed: https://review.openstack.org/647974
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=38b4e4e3b81009b1cac720a2021da1212b86d346
Submitter: Zuul
Branch: stable/queens

commit 38b4e4e3b81009b1cac720a2021da1212b86d346
Author: j-griffith <email address hidden>
Date: Thu Nov 29 18:07:58 2018 +0000

    Check Volume Status on attachment create/update

    Currently the new Attachment calls in Cinder aren't checking the status
    of the volume when create or update is called. This isn't good because
    it can mask problems with attach processes on the volume.

    This patch adds an explicit check of the volume status in both
    attachment_create and attachment_update, and if the volume status is in
    any error state, the call will result in an InvalidVolume exception.

    This is an API change to fix a bug, and is not microversioned.

    Closes-Bug: #1805762

    Change-Id: I9b32c4db93879dda6490b244643de1a18bddbbf5
    (cherry picked from commit 7d7dc2659d1ad07ef77892306827ca4a662e315d)
    (cherry picked from commit b9a9492baca004494dd099e2e2d0180cc8483b28)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 13.0.5

This issue was fixed in the openstack/cinder 13.0.5 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.7

This issue was fixed in the openstack/cinder 12.0.7 release.

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.