During a rolling upgrade, volume creation can fail with 'volume_type cannot be None'

Bug #1619008 reported by Nate Potter
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Michal Dulko

Bug Description

During the rolling upgrade process, the first things to be upgraded (I believe) are the database and the c-api. After these two steps it's assumed that the cloud should still be functional, given the rpc version pinning and OVO work.

At this point in the upgrade it's possible for volume creation to fail, saying that volume_type cannot be None. This is because in mitaka volume creation with a type of None was supported, but in master a commit changed the way this worked, so https://review.openstack.org/#/c/353665/1 was merged to the scheduler service to fix that. However, at this point in the rolling upgrade process the API has been updated but the scheduler still hasn't, so the exception is thrown.

Perhaps some check should be added in the API side to ensure that an exception won't be thrown if the scheduler is still in mitaka, or the fix linked above could be backported to mitaka to mitigate this.

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

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/363928

Nate Potter (ntpttr)
Changed in cinder:
assignee: nobody → Nate Potter (ntpttr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/mitaka)

Change abandoned by Nate Potter (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/363928
Reason: Backport isn't the way to go for this fix

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

Changed in cinder:
assignee: Nate Potter (ntpttr) → Michal Dulko (michal-dulko-f)
status: New → In Progress
Revision history for this message
Michal Dulko (michal-dulko-f) wrote :

@Nate: This wasn't trivial, but I finally found why this was happening. Seems like my patch should fix it, but please validate.

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

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

commit 91bdf9de4c1e0726892384605704d87b318e7a69
Author: Michał Dulko <email address hidden>
Date: Fri Sep 9 16:01:27 2016 +0200

    Fix creating typeless volumes with Mitaka's c-sch

    In Mitaka as a workaround for creating volumes without volume type c-api
    was sending an empty dictionary as request_spec['volume_type'] in
    create_volume() RPC cast to scheduler. This changed in Newton and we're
    handling this situation directly in scheduler, but when running Newton's
    c-api with Mitaka's c-sch we should mimic older behavior. This patch
    implements that.

    Change-Id: I3dbb1934f3d8e68fef49f56155cbf59bc5fadc3a
    Closes-Bug: 1619008

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/374745

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

Reviewed: https://review.openstack.org/374745
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=72a1c5dfa2a0ddd650f720cc36ae9b61b5972a19
Submitter: Jenkins
Branch: stable/newton

commit 72a1c5dfa2a0ddd650f720cc36ae9b61b5972a19
Author: Michał Dulko <email address hidden>
Date: Fri Sep 9 16:01:27 2016 +0200

    Fix creating typeless volumes with Mitaka's c-sch

    In Mitaka as a workaround for creating volumes without volume type c-api
    was sending an empty dictionary as request_spec['volume_type'] in
    create_volume() RPC cast to scheduler. This changed in Newton and we're
    handling this situation directly in scheduler, but when running Newton's
    c-api with Mitaka's c-sch we should mimic older behavior. This patch
    implements that.

    Change-Id: I3dbb1934f3d8e68fef49f56155cbf59bc5fadc3a
    Closes-Bug: 1619008
    (cherry picked from commit 91bdf9de4c1e0726892384605704d87b318e7a69)

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

This issue was fixed in the openstack/cinder 9.0.0.0rc2 release candidate.

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

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

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

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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