← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1614506] Re: Volume doesn't gets deleted upon instance termination

 

Hello,

Typically, volumes persist even after the instance they were attached to
is destroyed. I was not aware of delete_on_termination flag. I did some
digging around, and I've noticed that this flag is only mentioned by the
block_device_mapping_v1 api, but not the block_device_mapping_v2, which
you are using [1]. Can you try passing that flag in a
block_device_mapping_v1 request?

Finally, the nova-compute services do not delete volumes, something like
this would be done by the nova-api / nova-conductor services.

[1] http://docs.openstack.org/developer/nova/block_device_mapping.html

Best regards,

Claudiu Belu

** Project changed: compute-hyperv => nova

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

Title:
  Volume doesn't gets deleted upon instance termination

Status in OpenStack Compute (nova):
  New

Bug description:
  Hello!

  I have tried to create OpenStack compute instances from an image via
  the following API requests (according to the API guide
  <http://developer.openstack.org/api-ref-
  compute-v2.1.html#createServer>):

  ---8<---
  {
      "server" : {
          "name" : "test",
          "flavorRef" : "http://openstack.example.com/flavors/2";,
          "networks" : [{
              "uuid" : "1beeab54-0125-4ac0-8ac1-3614a02e399f",
              "tag": "instance-net"
          }],
          "imageRef": "61d15016-1b4f-4303-9d8a-6f8cb531a0f5",
          "block_device_mapping_v2": [{
              "uuid": "70a599e0-31e7-49b7-b260-868f441e862b",
              "source_type": "image",
              "destination_type": "volume",
              "boot_index": 0,
              "volume_size": "1",
              "tag": "disk1",
              "delete_on_termination": "true"
          }],
          "security_groups": [
              {
                  "name": "default"
              }
          ]
      }
  }
  --->8---

  ---8<---
  {
      "server" : {
          "name" : "test",
          "flavorRef" : "http://openstack.example.com/flavors/2";,
          "networks" : [{
              "uuid" : "1beeab54-0125-4ac0-8ac1-3614a02e399f",
              "tag": "instance-net"
          }],
          "imageRef": "61d15016-1b4f-4303-9d8a-6f8cb531a0f5",
          "delete_on_termination": "true"
          "security_groups": [
              {
                  "name": "default"
              }
          ]
      }
  }
  --->8---

  Both requests result in creation of instances, no errors present in
  the server response, but when I then remove instances, volumes stay
  there. URL where I submit requests looks as follows: https://<our-
  server-hostname>:8774/v2/7d0f17355baf480ba2a317467cdf70fc/servers

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