← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1621452] Re: need handle DevicePathInUse in attach_volume

 

Reviewed:  https://review.openstack.org/367358
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6051499a856659290c381e1a80328e48fe8a2199
Submitter: Jenkins
Branch:    master

commit 6051499a856659290c381e1a80328e48fe8a2199
Author: jichenjc <jichenjc@xxxxxxxxxx>
Date:   Wed Sep 7 04:41:06 2016 +0800

    Catch DevicePathInUse in attach_volume
    
    DevicePathInUse might be raised in attach action,
    we didn't catch it so a 500 error might be returned
    to end user.
    
    Change-Id: Ic9f0979b5adef28bb47756e7fc2ce5a3d6493298
    Closes-Bug: 1621452


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1621452

Title:
  need handle DevicePathInUse in attach_volume

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) mitaka series:
  In Progress
Status in OpenStack Compute (nova) newton series:
  In Progress

Bug description:
  Attach a volume with used name will got error, the root cause is we
  didn't handle DevicePathInUse

  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions     instance, bdms, new_bdm)
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1667, in _get_device_name_for_instance
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions     instance, bdms, block_device_obj.get("device_name"))
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/compute/utils.py", line 104, in get_device_name_for_instance
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions     mappings['root'], device)
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions   File "/usr/lib/python2.7/site-packages/nova/compute/utils.py", line 185, in get_next_device_name
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions     raise exception.DevicePathInUse(path=device)
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions DevicePathInUse: The supplied device path (/dev/sda) is in use.
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions
  2016-09-06 08:34:17.148 5177 ERROR nova.api.openstack.extensions
  2016-09-06 08:34:17.223 5177 INFO nova.api.openstack.wsgi [req-665260fe-9434-4259-a658-f1eb30948522 6a1f271818af46f3ae3c99d09a1efdff 134b4b70bc464c0db32624ad256a6563 - - -] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1621452/+subscriptions


References