Don't allow modification of in-use Volume Types

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

Bug Description

Currently we allow an admin to update/modify extra-specs of a volume type even if/when a volume of said type exists. This isn't good, because it means the extra-specs could be modified to something that the Volume backing doesn't actually support, not to mention that it's misleading because just changing the extra-specs will have no effect on existing volumes.

We also have some issues around the legacy default CG types that we would prefer to not modify them.

This bug proposes that we disallow modification of Volume Type Extra-Specs if there are any existing volumes assigned to that type.

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

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/440680
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=b245225d5e67120dfe7aee5e941f381846c89423
Submitter: Jenkins
Branch: master

commit b245225d5e67120dfe7aee5e941f381846c89423
Author: John Griffith <email address hidden>
Date: Thu Mar 2 15:32:47 2017 +0000

    Disallow modification of in use Volume Types

    Modifying a Volume Type doesn't actually update any
    volumes that are currently using said Volume Type. Given
    that this is an admin only operation it was never really
    too much of a concern.

    There has been some issues reported however where an admin
    modified the type while volumes were using it, then ran into
    problems becuase the volumes didn't have the expected settings
    described by the type.

    This change adds a check before updating/deleting extra-specs of
    a volume type. If there are any volumes currently assigned to
    the type being modified/deleted the operation will fail with an
    InvalidRequest immediately when attempting the call.

    To maintain backward compatability incase someobdy is using this
    for something and they are really really sure they want to
    continue doing so, we also add a config option to allow the
    old behavior but default to NOT allowing it:
      'allow_inuse_volume_type_modification=False'

    APIImpact

    Change-Id: Iaea721e13a3903cae60cc3fb3acfad03bd173a6b
    Closes-Bug: #1667071

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

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

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.