← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1553152] Re: misleading API documentation for block_device_mapping_v2

 

Reviewed:  https://review.openstack.org/291270
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=f98db59e9856abc19c57837460a5404e4fd75dfb
Submitter: Jenkins
Branch:    master

commit f98db59e9856abc19c57837460a5404e4fd75dfb
Author: Sean Dague <sean@xxxxxxxxx>
Date:   Thu Mar 10 11:05:10 2016 -0500

    Put in example block_device_mapping structure
    
    The documentation on the block_device_mapping_v2 structure doesn't
    really explain much. This provides a sample structure so that it at
    least gives a starting point for people. It would be best if this was
    expanded on further, but it's a start.
    
    Closes-Bug: #1553152
    
    Change-Id: If559035fbcf3d4c79bae5672abf6718915917d72


** Changed in: openstack-api-site
       Status: Confirmed => 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/1553152

Title:
  misleading API documentation for block_device_mapping_v2

Status in OpenStack Compute (nova):
  Confirmed
Status in openstack-api-site:
  Fix Released

Bug description:
  Documentation [1] about `block_device_mapping_v2` when creating a
  server instance is misleading as it doesn't explain that it must
  actually be an array of mappings and there is no complete list of the
  supported keys. For example `volume_size` and `uuid` are not even
  mentioned.

  Thanks to an unrelated github bug [2] I figured it's something like this:
          "block_device_mapping_v2": [
            {
              "boot_index": "0",
              "uuid": "ac408821-c95a-448f-9292-73986c790911",
              "source_type": "image",
              "volume_size": "25",
              "destination_type": "volume",
              "delete_on_termination": true
            }

  The above example is something that very quickly gets you to the
  point. In block_device_mapping.rst doc I see some of the things
  explained but first I could only find that doc grepping nova's sources
  and I still couldn't figure from that doc how in hell should I
  construct my API call.

  What I wanted to do is to basically launch an instance off a new
  custom sized volume. That turned out very easy and conscious
  eventually but finding that out took hours for me as I'm simply an API
  user and I have no experience whatsoever installing, configuring, even
  less hacking on OpenStack.

  P.S. I'm using a similar feature in GCE. They have it even nicer. When
  you specify the instance disks, it supports any options that are
  supported by the api call creating a standalone disk. I guess values
  are then passed to the disk api as is. Might be worth considering for
  a future API version. e.g. at the moment I can't specify a name for
  the new volume or many of the other options supported by the OS
  volumes API.

  [1] http://developer.openstack.org/api-ref-compute-v2.1.html#createServer
  [2] https://github.com/ggiamarchi/vagrant-openstack-provider/issues/209#issuecomment-73961050

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


References