Comment 10 for bug 1441990

Revision history for this message
wanghao (wanghao749) wrote :

@Feodor, If you used novaclient command to create VM, it will raise exception like this. Because the client will add a block_device_mapping like this:

"block_device_mapping_v2": [{"source_type": "image", "delete_on_termination": true, "boot_index": 0, "uuid": "f69790be-ed6f-4806-b270-f85365a2e31b", "destination_type": "local"}, {"source_type": "blank", "device_name": "vdb", "volume_size": "1", "boot_index": "0", "destination_type": "volume"}]

So, the nova will check this dulicate boot_index=0 and raise this error.

But if using REST client tool instead of novaclient to send the creation request, it will be reproduced.

There is my request body by using Postman Tool to send REST request:

{
  "server": {
    "name": "wanghao",
    "imageRef": "XXXXXX",
    "block_device_mapping_v2": [{"source_type": "blank",
                                 "device_name": "vdb",
                                 "volume_size": "1",
                                 "boot_index": "0",
                                 "destination_type":
                                 "volume"}],
  "flavorRef": 1,
  "max_count": 1,
  "min_count": 1,
  "networks": [{"uuid": "XXXXXX"}]
 }

You can have a try. :)