Volume attach reports wrong device when it is "auto attached" in Xen instances

Bug #1055715 reported by Chuck Thier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Vish Ishaya

Bug Description

If you attach a volume like so:

nova volume-attach 8f1a38ad-5818-4874-b9fb-72d9a6fc9f02 a71b159b-c93b-4964-8df8-2c811c173114 auto

The volume attachment shows up as /dev/sdb rather than /dev/xvdb

 nova volume-show a71b159b-c93b-4964-8df8-2c811c173114

attachments | [{u'device': u'/dev/sdb', u'server_id': u'8f1a38ad-5818-4874-b9fb-72d9a6fc9f02', u'id': u'a71b159b-c93b-4964-8df8-2c811c173114', u'volume_id': u'a71b159b-c93b-4964-8df8-2c811c173114'}

Revision history for this message
Vish Ishaya (vishvananda) wrote :
Changed in nova:
assignee: nobody → Vish Ishaya (vishvananda)
status: New → Triaged
importance: Undecided → High
Changed in nova:
status: Triaged → In Progress
tags: added: folsom-rc-potential
Changed in nova:
milestone: none → folsom-rc3
tags: removed: folsom-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/13649
Committed: http://github.com/openstack/nova/commit/69564763960cddc249138469811a0a771db16e19
Submitter: Jenkins
Branch: master

commit 69564763960cddc249138469811a0a771db16e19
Author: Vishvananda Ishaya <email address hidden>
Date: Tue Sep 25 11:15:14 2012 -0700

    Fix issues with device autoassignment in xenapi

    This is a workaround for two issues in xenapi. The first is that
    does not set the instance default_root_device to /dev/xvda so it
    defaults to /dev/sda. The proper fix for this involves setting the
    default_root_device in xenapi and a db migration to set the proper
    default_root_device for existing instances.

    This patch works around this issue by explicitly setting the prefix
    to /dev/xvd if the compute driver is xenapi.

    The second issue is that xenapi never updates the instance record
    to include default_swap_device and default_ephemeral device. The
    fix for this involes adding the appropriate update to the instance
    record and a migration that sets the proper values for all existing
    instances.

    This patch works around this issue by explicily checking the
    instance_type and removing the devices from the list if the compute
    driver is xenapi.

    Fixes bug 1055715 and bug 1055712

    Change-Id: I61aa15e69eb0a22430bb22ea5149b1f0735b3328

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/13674

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (milestone-proposed)

Reviewed: https://review.openstack.org/13674
Committed: http://github.com/openstack/nova/commit/076cb9d98330ae1ead94cc4d2c08b27939752648
Submitter: Jenkins
Branch: milestone-proposed

commit 076cb9d98330ae1ead94cc4d2c08b27939752648
Author: Vishvananda Ishaya <email address hidden>
Date: Tue Sep 25 11:15:14 2012 -0700

    Fix issues with device autoassignment in xenapi

    This is a workaround for two issues in xenapi. The first is that
    does not set the instance default_root_device to /dev/xvda so it
    defaults to /dev/sda. The proper fix for this involves setting the
    default_root_device in xenapi and a db migration to set the proper
    default_root_device for existing instances.

    This patch works around this issue by explicitly setting the prefix
    to /dev/xvd if the compute driver is xenapi.

    The second issue is that xenapi never updates the instance record
    to include default_swap_device and default_ephemeral device. The
    fix for this involes adding the appropriate update to the instance
    record and a migration that sets the proper values for all existing
    instances.

    This patch works around this issue by explicily checking the
    instance_type and removing the devices from the list if the compute
    driver is xenapi.

    Fixes bug 1055715 and bug 1055712

    Change-Id: I61aa15e69eb0a22430bb22ea5149b1f0735b3328
    (cherry picked from commit 69564763960cddc249138469811a0a771db16e19)

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-rc3 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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