Invalid root device name for volume-backed instances with libvirt

Bug #1481164 reported by Feodor Tersin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Feodor Tersin

Bug Description

Since that https://review.openstack.org/#/c/189632/ is merged, root device name of volume backed instances is /dev/vdb with libvirt.

Steps to reproduce against DevStack:
1 Boot an instance:
nova --block-device source=image,dest=volume,size=1,bootindex=0,id=<xxx> --flavor m1.nano inst
where xxx is an image id.

2 Look at the device name:
openstack volume list

Expected value: /dev/vda
Actual value: /dev/vdb

Inside guest OS the volume is displayed as /dev/vda.

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

Changed in nova:
assignee: nobody → Feodor Tersin (ftersin)
status: New → In Progress
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → High
tags: added: libvirt volumes
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/208796
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0ed3f33028b539877abf51b5a36a0f8e5c0a5927
Submitter: Jenkins
Branch: master

commit 0ed3f33028b539877abf51b5a36a0f8e5c0a5927
Author: Feodor Tersin <email address hidden>
Date: Mon Aug 3 21:12:38 2015 +0300

    libvirt: Fix root device name for volume-backed instances

    Since that I76a7cfd995db6c04f7af48ff8c9acdd55750ed76 was merged, root
    device name is assigned /dev/vdb for volume-backed instances with
    libvirt.

    The reasons are:
    1 now device names are reset to None for all bdms before libvirt's
    get_disk_mapping call;
    2 get_disk_mapping processes the root bdm by get_info_from_bdm twice:
    as a root bdm, and as a regular bdm;
    3 for each call of get_info_from_bdm the root bdm is passed with no
    device name;
    4 get_info_from_bdm generates a new device name for each call with empty
    device name.

    So vda is assigned for 'root' record in mapping, but vdb - for the
    volume record.

    This patch updates root bdm after the first call, thus the second call
    is performed with certain device name.

    Closes-Bug: #1481164
    Change-Id: I3ce12563846b2c34ac778d44e7582eef930ae4b0

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-3 → 12.0.0
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.