← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Public bug reported:

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

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: api

** Tags added: api

-- 
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):
  New

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


Follow ups