_validate_bdm not using the 'reserve_volume' Cinder API in a multi-cell environment

Bug #1746634 reported by melanie witt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
melanie witt
Pike
Fix Committed
Medium
Matt Riedemann

Bug Description

During instance creation, we call _validate_bdm to valid block device mappings boot indexes, accessibility, attachability, etc and we call the Cinder API to do some of that. We query the service version to decide which Cinder APIs to call and currently, we aren't querying all cells for the service version. Because we're creating an instance, we don't yet know what cell it will land in, so we must query all cells to correctly get the service version. Else, we get a service version of 0 and we'll use the old 'check_attach' Cinder API instead of the newer 'reserve_volume' API in a multi-cell environment.

https://github.com/openstack/nova/blob/c1442d3/nova/compute/api.py#L1326

I found this while working on improvements for the CellDatabases test fixture.

Tags: api cells volumes
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/539755

Changed in nova:
status: New → In Progress
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Medium
tags: added: api volumes
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/541036

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

This issue was fixed in the openstack/nova 17.0.0.0rc1 release candidate.

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

Reviewed: https://review.openstack.org/541036
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6d1877bf1da098b3be17fbd2dd5e53eecd2f048c
Submitter: Zuul
Branch: stable/pike

commit 6d1877bf1da098b3be17fbd2dd5e53eecd2f048c
Author: melanie witt <email address hidden>
Date: Wed Jan 31 20:45:51 2018 +0000

    Query all cells for service version in _validate_bdm

    We call _validate_bdm during instance creation to validate block device
    mappings boot indexes, accessibility, attachability, and so on. We need
    to query the service version in order to decide which Cinder APIs to
    call and because we're in the middle of creating the instance, we
    don't yet know which cell it's going to land in.

    This changes the service version query to check all cells so that
    _validate_bdm will use the 'reserve_volume' Cinder API in a multi-cell
    environment. Use of the 'reserve_volume' API is based on the service
    version check and without targeting any cells, the service version will
    be 0 and we'll use the old 'check_attach' API.

    Conflicts:
          nova/tests/unit/compute/test_compute_api.py

    NOTE(mriedem): Conflicts are due to not having change
    Ifc01dbf98545104c998ab96f65ff8623a6db0f28 in Pike which added
    a test and updated some other tests which we now have to do
    in this change.

    Closes-Bug: #1746634

    Change-Id: I68d5398d2a6d85c833e46ce682672008dbd5c4c1
    (cherry picked from commit 0258cecaca88d4a305e99c5a17e2230361ef1235)

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

This issue was fixed in the openstack/nova 16.1.0 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.