← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1491325] Re: nova api v2.1 does not allow to use autodetection of volume device path

 

Actually this isn't a problem in nova, device is optional, it's not
nullable though. I have a change in tempest that attaches a volume and I
don't specify device, it works fine:

http://logs.openstack.org/55/218355/6/check/gate-tempest-dsvm-
nova-v21-full/03cdd7a/logs/tempest.txt.gz#_2015-09-02_17_32_14_204

So the bug is in novaclient passing device=None in the request.

** Also affects: python-novaclient
   Importance: Undecided
       Status: New

** Changed in: nova
       Status: In Progress => Invalid

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

Title:
  nova api v2.1 does not allow to use autodetection of volume device
  path

Status in OpenStack Compute (nova):
  Invalid
Status in python-novaclient:
  In Progress

Bug description:
  Using API v2.1 we are forced to provide device path attaching a volume
  to an instance.

  using API v2.0 it allowed to provide 'auto' and in this case Nova
  calculated it by itself.

  It is very useful when we do not care about exact device path.

  using APi v2.1 Nova, at first verifies request body [1] and only then
  have logic to autodetect "device path". So, either autodetect is dead
  code now or request validation should be changed.

  For the moment, this bug is blocker for Manila project.

  We get one of two errors:

  Returning 400 to user: Invalid input for field/attribute device.
  Value: None. None is not of type 'string' __call__

  or

  Returning 400 to user: Invalid input for field/attribute device.
  Value: auto. u'auto' does not match
  '(^/dev/x{0,1}[a-z]{0,1}d{0,1})([a-z]+)[0-9]*$'

  Where Nova client says explicitly:

  $ nova help volume-attach
  usage: nova volume-attach <server> <volume> [<device>]

  Attach a volume to a server.

  Positional arguments:
    <server>  Name or ID of server.
    <volume>  ID of the volume to attach.
    <device>  Name of the device e.g. /dev/vdb. Use "auto" for autoassign (if supported)

  That "device" is optional and can be set to 'auto'.

  [1]
  https://github.com/openstack/nova/blob/b7c8a73824211db9627962abd31b8801cc2c2880/nova/api/openstack/compute/volumes.py#L270

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


References